Brick = script.Parent
Brick.Touched:connect(function(part)
if part.Parent.Humanoid then
if part.Parent.Humanoid.Health > 0 then
wait(0.5)
part.Parent:MoveTo(game.Workspace.EasyLobby.Position + Vector3.new(0,1,0))
local plr = game.Players:FindFirstChild(part.Parent.Name)
game.ReplicatedStorage.Winners.Value = game.ReplicatedStorage.Winners.Value.." "..plr.Name
end
end
end)
Hey guys I have a round-based game, and this script is inside of the part, where players touch it, they win
It works fine, but if someone wins, they're name will sometimes be printed more than once. I don't want to add a debounce in time because another player could step on the brick at the same time. Any ideas?

3 comments
Hey, thanks for this, but there will be multiple winners, and this only works for one person. How would this work?
If there are multiple winners you could make a folder and when a player touches the brick it inserts a model into that folder with the name of the player (if the player doesn't already have a model in it) and then you make a table with i, v in pairs and put "v.Name" as the name of an Instance.new("Model")
I didn't mean to say and then you make a table, I meant to say thats how you would do it