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 10 years ago

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

--!
local x = script.Parent
x.Parent = game.StarterGui
x.Adornee = game.Workspace.TpButton.Parts



function onclicked()
game:GetService('TeleportService'):Teleport(147513144, game.Workspace.LocalPlayer)
end

x.TeleportButton.MouseButton1Down:connect(onclicked)


0
Put this into a LocalScript and it should work for you User#11893 186 — 10y
0
It is in a ls reteach 0 — 10y

1 answer

Log in to vote
0
Answered by 10 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