So basically I had one line of code that gave me an error when I ran the game. checkpoints is the name of my variable and level is the leaderstats name that I entered but I can’t figure out why there is an error.
char:MoveTo(checkpoints[Level.Value].Position)```
Those three " ´ " are just a typo for the forum right?
Well if it’s not that you should give us at least some lines around it and the error message.
yeah thats a forum mistake
local Level = Instance.new("IntValue", leaderstats)
Level.Name = "Level"
Level.Value = 1
Level.Parent = leaderstats
player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
wait()
char:MoveTo(checkpoints.[Level.Value].Position)
hum.Touched:Connect(function(hit)
if hit.Parent == checkpoints then
if tonumber(hit.Name) == Level.Value + 1 then
Level.Value = Level.Value + 1
Whats the error the output gave you?
it just said that there was a Lua error
Can you send me a screenshot of it?
What you did is you added a debug point there, thats why the game pauses. If you know that can you just send me a picture of the OUTPUT not the call stack.
nevermind I found the problem is that the Level Value of 1 was not part of one of the folders but thanks for help