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

[Solv3d] ?

Asked by 10 years ago

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

Log in to vote
-2
Answered by 10 years ago

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")
0
i meant mg.Teamcolor = BrickColor.new("Bright blue") raymandon 0 — 10y
0
Oh, I see now :) Thank you the script makes even more sense since you added the comments! PreciPoo 0 — 10y
0
your welcome raymandon 0 — 10y
0
That won't work because mg returns it as a number value and not the players name Kozero 120 — 10y
0
it desnt raymandon 0 — 10y
Ad

Answer this question