I made this script using a click detector to teleport me to a game (like TMM, etc.)
s = game:service("TeleportService") id = 152594797 function onClicked() s:Teleport(id) end script.Parent.ClickDetector:connect(onClicked)
You are not specifying a player. You have to give the Teleport
method the player unless it is a localscript
. Which it should not be if you are using a ClickDetector
.
s = game:service("TeleportService") id = 152594797 function onClicked(player) s:Teleport(id,player) end script.Parent.ClickDetector:connect(onClicked)