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

[Solv3d] ?

I'm making a game that features a set of mini games and..... blah blah blah..... and I'm not necessarily sure what should be put into the script that randomly chooses a player to be teleported at a set of coordinates at the same time as the other players.

My Request:

What do I need in the script to randomly select a player to be ported at a set coordinates?

I'm not necessarily asking for a whole script but like trimmings would help me understand a little better.

In advance,

Thank you~

:)

1 answer

easy

m = game.Players:GetChildren()  -- gets players in server
 mg = m[math.random(1,#m)] -- choses random player 

the random player will now be called mg so if you want the players team to change you can do this

mg = BrickColor.new("Bright blue")

5 comments

0

i meant mg.Teamcolor = BrickColor.new("Bright blue")

0

Oh, I see now :) Thank you the script makes even more sense since you added the comments!

0

your welcome

0

That won't work because mg returns it as a number value and not the players name

0

it desnt

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