FYI: when a round starts all the players are put into an "InGame" folder so that's why I put that in the script
Everything in this script seems to work besides the teleport, I want to teleport everyone in the server.
wait(5)
local Part = script.Parent
local Debounce = false
local Players = game.Workspace.InGame:GetChildren()
local TPTo = game.Workspace.MainSpawn
Part.Touched:Connect(function(hit)
if not Debounce then
Debounce = true
if hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
print(hit.Parent)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Wins.Value = player.leaderstats.Wins.Value + 1
player.leaderstats.Bits.Value = player.leaderstats.Bits.Value + 25
print (player)
print (player.leaderstats.Wins.Value)
wait(5)
for _, v in pairs (Players)
do
local TPOb = v.HumanoidRootPart
TPOb.CFrame = CFrame.new(TPTo.Position)
end
Debounce = false
end
end
end)
