So, I have 2 teams, and I need a script that makes it so one player is on the team "Ao Oni" (JUST ONE), and the rest is on survivors. Also, I need the script to change the player after 120 seconds. Can you please help me?
Picture
Thanks!
So, I have 2 teams, and I need a script that makes it so one player is on the team "Ao Oni" (JUST ONE), and the rest is on survivors. Also, I need the script to change the player after 120 seconds. Can you please help me?
Picture
Thanks!
Pseudocode:
func SelectSpookyboy() :
players = getPlayerList()
numberOfPlayers = length(players)
randomIndex = random(1, numberOfPlayers)
chosenSpookyboy = players[randomIndex]
for player in players:
if player is not chosenSpookyBoy:
setTeam(player, TEAM_NOT_VERY_SPOOK)
else
setTeam(player, TEAM_SPOOK)
end if
respawnPlayer(player)
end for
end func
while true:
SelectSpookyBoy()
wait(120)
end while
super spooky
Your pseudocode just looks like its just to not directly copy and paste.
this looks sort of like a Python script but it also doesn't
@hiimgoodpack, yeah pretty much - it's pretty close to the real thing OP needs but it certainly won't work if they copy paste it. I actually accidentally wrote some of it in real Lua and had to go back and change it.
@MCAndRobloxUnited, well there's that running joke that Python is basically pseudocode in disguise
upvoted because python squad
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
Scripting helpers is not a request site.
This is not a request site. Please show us that you have made an attempt at solving your question by including code or explainig what you have tested. https://scriptinghelpers.org/help/how-post-good-questions-answers
Please update this question or it will probably be moderated.
Definitely be moderated*