Can't seem to get this working. Any help is appreciated
01 | --! |
02 | local x = script.Parent |
03 | x.Parent = game.StarterGui |
04 | x.Adornee = game.Workspace.TpButton.Parts |
05 |
06 |
07 |
08 | function onclicked() |
09 | game:GetService( 'TeleportService' ):Teleport( 147513144 , game.Workspace.LocalPlayer) |
10 | end |
11 |
12 | x.TeleportButton.MouseButton 1 Down: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.