I'm scripting an obby and I'm having an issue with the code. Each checkpoint is numbered so it is equivalent to the "leaderstats.Stage" value. The code is meant to take the value and teleport the player there but won't work.
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
char:SetPrimaryPartCFrame(workspace:FindFirstChild(player.leaderstats.Stage.Value).CFrame)
end)
end)

1 comment
It's not working because it's not possible to get the CFrame of a Value, hope this helps.