I tested it with someone else, it still only makes 1 of us win.
oops, updated it can you try again?
It works fine now, i have 2 things tho.
How would i be able to make the Name… has won been displayed longer? because now it just pops back to the Time left: instantly
And how would i be able to make the player reset after they won?
change the repeat loop below to :
repeat
roundLenght = roundLenght -1
status.Value = "Time left: "..roundLenght.."\n Current Winners : "..table.concat(winners,",")
wait(1)
until roundLenght == 0 or canWin == false or #workspace.Ingame:GetChildren() == 0
and to make player reset use plr:LoadCharacter()
also remove this line since there is already a loop in the countdown timer.
local String = table.concat(winners,",")
status.Value = String.." Won!"
This is easily exploitable, I’d suggest a position check of the RootPart.
It’s good you used a debounce, but for your case you should use a table to store the winning players, if that table reaches 3 players, it should stop collecting more players.
Thanks for the tip,
but could you explain this to me? as im an absolute beginner.
thats what if #winners <= 3 then
is for.
Ur helping me out so much and im also learning alot!
One more thing (i hope this will be the last haha)
So when someone wins and they get reloaded into the lobby, the statusbar doesnt update anymore so it says LABEL again. are we able to fix this?
what he meant is for example :
while wait(1) do
local OldPlayerPosition = HRP.Position
wait(1)
local NewPlayerPosition = HRP.Position
end
like if the OldPlayerPosition is too far from the NewPlayerPosition
the system will detect that the player is currently “teleporting”
BUT, exploiters can still remove your anti cheat by just removing that localscript that contains the anticheat.
Glad i can help!
is there any error popping up in the output?
No theres no error, it just says Label for a few seconds and then start the loop again with next minigame in … seconds
so i think the problem has to do with reloading the characters? i can send my whole script if needed.
oh ye forgot to mention!
in the screen gui of the status bar turn off resetonspawn property
and it will get fixed.
It fixed it indeed.
1 last thing xD
So when the 3rd player finished it goes to … Name has won and instantly start the loop again. Where do i need to add a wait(time) for it to show the current winners for a few seconds?
here
else
task.wait(2) -- change 2 to whatever you want.
canWin = false
table.clear(winners)
Thanks!.
else
status.Value = "Winners: "..table.concat(winners,",")
task.wait(3)
canWin = false
table.clear(winners)
i tried this myself so that after the round is done, or 3 people won that it displays for 3 secs: Winners: name, name, name (if people actually won) but this doesnt work. any idea’s on this?
its because the timer is still looping and changing the status.Value
Ahh yes thats true, any idea to fix this?
remove that and add it in here
until roundLenght == 0 or canWin == false or #workspace.Ingame:GetChildren() == 0
if canWin == false then
status.Value = "Winners : "..table.concat(winners,",")
end
It doesnt update and still says Time left: Current Winners: for a few sec. maybe a typo again?
(no errors)
did you put that after this in your script?
until roundLenght == 0 or canWin == false or #workspace.Ingame:GetChildren() == 0