When you first join my obby, you're always stuck halfway in the floor until you reset or die which fixes it. Here is the script that causes the issue (It helps run the checkpoint system):
game.Players.PlayerAdded:Connect(function(plr) local stage = plr:WaitForChild("leaderstats").Stage plr.CharacterAdded:Connect(function(char) repeat wait() until plr.Character ~= nil wait(0.01) local checkpoint = game.Workspace.Stages:FindFirstChild(stage.Value) char:FindFirstChild("HumanoidRootPart").CFrame = checkpoint.CFrame char:FindFirstChild("HumanoidRootPart").Position = Vector3.new(checkpoint.Position.x, checkpoint.Position.y + 5, checkpoint.Position.z) wait(0.1) end) end)
local Players = game:GetService('Players') Players.PlayerAdded:Connect(function(player) local stage = player:WaitForChild("leaderstats"):WaitForChild('Stage') player.CharacterAdded:Connect(function(character) local checkpoint = game.Workspace.Stages:FindFirstChild(stage.Value) delay(.3, function() -- time game waits after you've spawned before you get teleported, can change to your .01 if you would like -- moves character 10 studs above the part (change the Y position, which is currently 10, to where you want them to be teleported to) character:SetPrimaryPartCFrame(checkpoint.CFrame + Vector3.new(0,10,0)) end) end) end)
while Game.Players.PlayerAdded:wait().CharacterAdded:wait():move(Game["Run Service"].Stepped:wait()and Workspace.Stages[Game.Players:players()[#Game.Players:players()].leaderstats.Stage.Value].CFrame.p)==Game.Parent do end
I'm not sure this will work,
game.Players.PlayerAdded:Connect(function(plr) local stage = plr:WaitForChild("leaderstats").Stage plr.CharacterAdded:Connect(function(char) repeat wait() until plr.Character ~= nil wait(0.01) local checkpoint = game.Workspace.Stages:FindFirstChild(stage.Value) char:FindFirstChild("HumanoidRootPart").CFrame = char:FindFirstChild("HumanoidRootPart").Position * CFrame.new(checkpoint.Position.X, math.rad(checkpoint.Position.Y * 5), checkpoint.Position.Z) wait(0.1) end) end)
Try that. I'm not thinking it will work, but it could.
Common errors that might come from this script:
If it doesn't work...
That's all I've got. Good luck!