A simple teleporting touch function HOWEVER it only works once, when another player touches it. It doesn't teleport them...?
local Part = script.Parent
Part.Touched:Connect(function(hit)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player ~= nil then
local tele = game:GetService("TeleportService")
local gameID = 5791125484
if Player.leaderstats.Tickets.Value >=1 then
local gui = script.Parent.TPmessage
gui:Clone()
gui.Parent = Player.PlayerGui
Player.leaderstats.Tickets.Value = Player.leaderstats.Tickets.Value - 1
tele:Teleport(gameID, Player)
end
end
end)
need help ASAP considering this is the main function of the game!

1 comment
Ok so I found out the error, it is getting rid of the GUI even though I clone it...