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 6 years ago
Edited 6 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 6 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 — 6y
Ad

Answer this question