Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

When a user teleports, why do they get stuck?

I have a teleport GUI. It's supposed to teleport to a checkpoint in my Obby. However, they get stuck.

Code:

local plr = game.Players.LocalPlayer
local char = plr.Character




script.Parent.MouseButton1Click:Connect(function()
	char.HumanoidRootPart.CFrame = workspace.Checkpoints.Recent.CFrame 
end)

Screen recording: Click here

Thanks in the meantime!

1 answer

✓ Accepted answer

Make the character a bit higher when teleporting them by adding another CFrame to it.


local plr = game.Players.LocalPlayer
local char = plr.Character




script.Parent.MouseButton1Click:Connect(function()
    char.HumanoidRootPart.CFrame = workspace.Checkpoints.Recent.CFrame + Vector3.new(0, 5, 0)
end)

3 comments

0

That doesn't work, because it wanted Vector3 as a second argument.

0

Replace the CFrame.New to Vector3.New then

0

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.