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

Why does this not TP the person?

It has been working until I used Clonetrooper109 or whatever's Intro camera. I added scripts where when you click the skip "I renamed mine play" it spawns a plane and it SUPPOSED to TP the character to the aircraft but it isn't TPing. It's in a localscript and the parents go all the way to the Workspace. Please help!

function Click()
	wait (2)
script.Parent.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(-1884, 24, 1083)
end

script.Parent.MouseButton1Down:connect(Click)

1 answer

✓ Accepted answer

When using a LocalScript, you can use:

game.Players.LocalPlayer

to get the Player.

Using this, grab the character using the character property of the player, and change the torso's CFrame:

local Player = game.Players.LocalPlayer

function Click()
local S = Player.Character.Torso
S.CFrame = CFrame.new(-1884, 24, 1083)
end

script.Parent.MouseButton1Down:connect(Click)

1 comment

0

WOAH!! It worked!!!!! Thanks so much man!!

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