Need help with obby arrow

Hey guys, i have one problem in obby arrow i’m need help.


When I come in, this error is written to me, but there are no arrows showing to go next stage.

she is behind me and does not work.

Pointer Script:

while wait(1.3) do
	local num = game.Players.LocalPlayer:WaitForChild('leaderstats',math.huge):WaitForChild('Stage')
	if num then
		game.TweenService:Create(workspace.Pointer,TweenInfo.new(math.random(7,13)/10),{CFrame =( workspace.Checkpoints:FindFirstChild("Checkpoint "..num.Value+1) or workspace.Checkpoints["Checkpoint "..num.Value]).CFrame*CFrame.new(2,math.random(3,5),0)}):Play()
end end

Are the names of the checkpoints correct (capitalization, spaces)?

Hm, when I change the name in the folder to “checkpoint 1” , I have a lot of errors


and this is when I put it back as it was. 1,2,3,4,5,6,7

Well, from what I can tell, you are referencing them in your script as “Checkpoint #” (the # is the number), while in the folder they are listed “1”, “2”, “3”, and so on. That’s why “Checkpoint 5” is not a valid member of the folder, because the checkpoints/stages’ names are just the number.

Is there a way to fix this? to make it work for numbers?

Yep, in the line of your code:

game.TweenService:Create(workspace.Pointer,TweenInfo.new(math.random(7,13)/10),{CFrame =( workspace.Checkpoints:FindFirstChild("Checkpoint "..num.Value+1) or workspace.Checkpoints["Checkpoint "..num.Value]).CFrame*CFrame.new(2,math.random(3,5),0)}):Play()

the part where it says :FindFirstChild("Checkpoint "..num.Value+1) or workspace.Checkpoints["Checkpoint "..num.Value]), is trying to reference the one the player needs to go to, or the one they’re already on, but it’s referencing to them as “Checkpoint”. What you need to do is change those lines to this:

:FindFirstChild(tostring(num.Value+1)) or workspace.Checkpoints[tostring(num.Value)])

You need to add a ) between the two end

аврпвпр

New XD, i’m confused

Apologies, I’m not in Studio right now and am writing using the DevForum.

Okay, I hope someone can help with this problem.