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

How to make a Team Randomizer? (Read)

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

https://imgur.com/a/w4rMPGP

Thanks!

4 comments

0

Scripting helpers is not a request site.

0

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

0

Please update this question or it will probably be moderated.

0

Definitely be moderated*

1 answer

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

6 comments

1

super spooky

0

Your pseudocode just looks like its just to not directly copy and paste.

0

this looks sort of like a Python script but it also doesn't

0

@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.

0

@MCAndRobloxUnited, well there's that running joke that Python is basically pseudocode in disguise

0

upvoted because python squad

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