RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a clientsided floating arrow that shows the player the next stage checkpoint on the obby"
-- local script local Players = game:GetService("Players") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local arrow = Instance.new("Part") arrow.Shape = Enum.PartType.Cylinder arrow.Size = Vector3.new(1, 2, 1) arrow.BrickColor = BrickColor.new("Bright yellow") arrow.Anchored = true arrow.Parent = game.Workspace local function updateArrow() while true do local checkpoints = game.Workspace.Checkpoints:GetChildren() local currentCheckpoint = player.leaderstats.Checkpoint.Value local nextCheckpoint = checkpoints[currentCheckpoint + 1] if nextCheckpoint then arrow.CFrame = CFrame.new(character.HumanoidRootPart.Position + Vector3.new(0, 5, 0), nextCheckpoint.Position) * CFrame.Angles(0, math.pi / 2, 0) else arrow:Destroy() break end wait() end end character.Humanoid.Died:Connect(function() arrow:Destroy() end) updateArrow()