Teleporting Function Works Only Once?
A simple teleporting touch function HOWEVER it only works once, when another player touches it. It doesn't teleport them...?
01 | local Part = script.Parent |
04 | Part.Touched:Connect( function (hit) |
05 | local Player = game.Players:GetPlayerFromCharacter(hit.Parent) |
07 | local tele = game:GetService( "TeleportService" ) |
08 | local gameID = 5791125484 |
09 | if Player.leaderstats.Tickets.Value > = 1 then |
10 | local gui = script.Parent.TPmessage |
12 | gui.Parent = Player.PlayerGui |
13 | Player.leaderstats.Tickets.Value = Player.leaderstats.Tickets.Value - 1 |
14 | tele:Teleport(gameID, Player) |
need help ASAP considering this is the main function of the game!