Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone help me with TeleportService?

Asked by 11 years ago

Can't seem to get this working. Any help is appreciated

01--!
02local x = script.Parent
03x.Parent = game.StarterGui
04x.Adornee = game.Workspace.TpButton.Parts
05 
06 
07 
08function onclicked()
09game:GetService('TeleportService'):Teleport(147513144, game.Workspace.LocalPlayer)
10end
11 
12x.TeleportButton.MouseButton1Down:connect(onclicked)
0
Put this into a LocalScript and it should work for you User#11893 186 — 11y
0
It is in a ls reteach 0 — 11y

1 answer

Log in to vote
0
Answered by 11 years ago

You put game.Workspace.LocalPlayer on line 9 when it should be game.Players.LocalPlayer.

See the wiki page on LocalPlayer for more information.

Ad

Answer this question