I am using my own old broken obby script that didn't work and a derivation of a script from Code Theorem on youtube. The problem is I have the same error which is the player not going where I want them to.
I have parts which are number name based on the fact that if touched and higher than plr.leaderboard.Stage.Value they're name will become the value of Stage in the leaderboard. I also have a level name value which works as well. My problem is when I attempt to make the player spawn at the part with the name equal to Stage's value and with the string value that equals level's value.
Please tell me what I am doing wrong:
lead = nil
Stag = nil
Stag2 = nil
game.Players.PlayerAdded:connect(function(plr)
lead = Instance.new('Model')
lead.Name = "leaderstats"
lead.Parent = plr
Stag = Instance.new('IntValue')
Stag.Name = "Stage"
Stag.Parent = lead
Stag.Value = 0
Stag2 = Instance.new('StringValue')
Stag2.Name = "Level"
Stag2.Parent = lead
Stag2.Value = "Not Included"
plr.CharacterAdded:connect(function(chr)
local spawn = script.Parent[""..plr.leaderstats.Stage.Value]
if spawn.StringVal.Value == Stag2.Value then
chr:MoveTo(spawn.Position)
end
end)
end)
for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "Part" then
v.Touched:connect(function(hit)
if Stag.Value < tonumber(v.Name) then
Stag.Value = tonumber(v.Name)
Stag2.Value = v.StringVal.Value
end
end)
end
end
lines to emphasize:
plr.CharacterAdded:connect(function(chr)
local spawn = script.Parent[""..plr.leaderstats.Stage.Value]
if spawn.StringVal.Value == Stag2.Value then
chr:MoveTo(spawn.Position)
end
end)

2 comments
Try looking into this: http://wiki.roblox.com/index.php?title=Teleportation
@TSP273 Tried replacing chr:MoveTo(spawn.Position) with chr.Torso.CFrame = CFrame.new(Vector3.new(0, 3, 0))+spawn.Position, still not working do you see an error?