Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a possible fix?

This is my script to make it so that when you die that you go to the "Bright orange" team. And it works. Unfortunately, I don't want them to be on the orange team when the round restarts. I want them to be on the blue and then the script should start. What ways I guess are there to fix this?

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c:WaitForChild("Humanoid").Died:connect(function()
p.TeamColor = BrickColor.new("Bright orange") 
end)
end)
end)

Thank you. (Not a request)

2 answers

✓ Accepted answer

Then, from the main or another script, you should try to disabled the script when the round is restarting. And set then the disable property of the script to false so it can operate.

Stuff to know *The script has a property called "Disabled", when it's set to true(when it's ticked) it won't operate, when it's set to false(default) it will operate. Note that when reenabling the script will cause it to redo all the code inside it. *

EDIT: The code:

script = -- script location
script.Disabled = true -- won't operate
-- code
script.Disabled = false -- It will redo the whole code inside it from start(It will basically reset the script.)

1 comment

0

Cool it worked :)

If everyone dies when the round restarts...

In the script you have for restarting the round, just add a line of code that changes everyone's TeamColor to Blue with the CharacterAdded event.

This discussion is preserved as it was. New answers, comments, and votes are closed.