Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How to make a Team Randomizer? (Read) [closed]

Asked by 6 years ago

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!

0
Scripting helpers is not a request site. DinozCreates 1070 — 6y
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 User#5423 17 — 6y
0
Please update this question or it will probably be moderated. User#5423 17 — 6y
0
Definitely be moderated* DinozCreates 1070 — 6y

Closed as Not Constructive by DinozCreates, fredfishy, DeceptiveCaster, and User#24403

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
fredfishy 833 Moderation Voter
6 years ago

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
1
super spooky DinozCreates 1070 — 6y
0
Your pseudocode just looks like its just to not directly copy and paste. hiimgoodpack 2009 — 6y
0
this looks sort of like a Python script but it also doesn't DeceptiveCaster 3761 — 6y
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. fredfishy 833 — 6y
View all comments (2 more)
0
@MCAndRobloxUnited, well there's that running joke that Python is basically pseudocode in disguise fredfishy 833 — 6y
0
upvoted because python squad User#24403 69 — 6y
Ad