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)
You put game.Workspace.LocalPlayer
on line 9 when it should be game.Players.LocalPlayer
.
See the wiki page on LocalPlayer for more information.