So i have a script, and it's not working, sometimes it works, and sometimes it just crashes your game! Please help me, it's for a game I'm working on. Here's the script.
local TeleportService = game:GetService("TeleportService")
local gameID = {Put game link here}
function onTouched(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
TeleportService:Teleport(gameID, player)
end
end
script.Parent.Touched:connect(onTouched)

1 comment
I know this post is old but I'd like to point out that that is not the devforum.