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

Teleporting player not working in button gui?

when i run this my body will be teleported but my head will stay same position and my body will become invisible.

function click()
	game.Players.LocalPlayer.Character.HumanoidRootPart.Position = (Vector3.new(205.45, 11.01, 54.83))
end
script.Parent.MouseButton1Click:Connect(click)

6 comments

0

Teleport with CFrame and not Vector3, so change Position to CFrame and Vector3 to CFrame

0

incap make that a answer or imma jack ur rep

0

Thank you!

0

accept a answer or [solved] plz

0

the answer isn't very good

0

thats why i said or [solved], just so its clear its been answered. noob.

1 answer

✓ Accepted answer

Use CFrame of the HumanoidRootPart.

function click()
local c = game.Workspace[game.Players.LocalPlayer.Name]
c.HumanoidRootPart.CFrame = Vector3.new(205.45, 11.01, 54.83)
end
script.Parent.MouseButton1Click:Connect(click)

2 comments

0

That's not the correct way to get the player char

0

get character with game.Players.LocalPlayer.Character.

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