local x = game.Workspace.tpReceive.Position.X
local y = game.Workspace.tpReceive.Position.Y
local z = game.Workspace.tpReceive.Position.Z
function onTouched(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local winnerGui = player.PlayerGui.WinnerStatusGui.WSFrame.WSText
local pointsGui = player.PlayerGui.PointsGui.PointsFrame.Points
local number = tonumber(pointsGui.Text)
if number == nil then number = 0
end
number = number + 1
pointsGui.Text = number
for i, object in pairs(game.Players:GetChildren()) do
if object:FindFirstChild("PlayerGui") then
local pg = object:FindFirstChild("PlayerGui")
local winner = pg.WinnerStatusGui.WSFrame.WSText
winner.Text = hit.Parent.Name.." has prevailed!"
for i, object in pairs (game.Workspace:GetChildren()) do
if object:FindFirstChild("Torso") then
local torso = object:FindFirstChild("Torso")
torso.CFrame = CFrame.new(x, y, z)
wait(5)
winner.Text = " "
end
end
end
end
end
end
script.Parent.Touched:connect(onTouched)
There's the code (clearly) and the problem I'm having is that, I server tested it through studio with all the guests and stuff, and it seems to teleport players late, and give them late notifications, etc. I cant figure out why it would do this, could someone help me out? (Any other bugs found and fixed/explained would also be greatly appreciated!) Thanks :)

1 comment
Thank you :D that saves me a whole lot of time