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

i keep not getting teleported to my other places i dont know why?

Asked by 7 years ago
Edited 7 years ago

so i create the GUI screen teleported but when im trying it on studio it work but it doesnt work on server.

teleport = game:GetService("TeleportService")
place = 1243953879
button = script.Parent



button.MouseButton1Click:connect(function(p)
        teleport:Teleport(place,p)  

end)

1 answer

Log in to vote
0
Answered by 7 years ago
teleport = game:GetService("TeleportService")
place = 1243953879
button = script.Parent
local player = game.Players.LocalPlayer -- You forgot the LocalPlayer also don't put this in an server script!


button.MouseButton1Click:connect(function(p)
        teleport:Teleport(place,player)  

end)

Hope i helped you out :)

0
thank you so much :) ReyLaFreeze 26 — 7y
Ad

Answer this question