generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: quick question?

Previous Thread :: Next Thread 
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 05:14 AM
i keep forgetting how to address players

may someone tell me?

i'm trying to use math.random
Report Abuse
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 05:29 AM
bumb
Report Abuse
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 05:42 AM
bump 2
Report Abuse
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 06:08 AM
bump 3
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 Feb 2015 08:37 AM
for a single player:
game.Players.Maxomega3
for all players in a game:
game.Players:GetPlayers ()
Report Abuse
Haxisy is not online. Haxisy
Joined: 30 Dec 2014
Total Posts: 160
01 Feb 2015 09:18 AM
Thats true
Report Abuse
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 09:44 AM
thanks 4 the help.
Report Abuse
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 09:55 AM
may i ask, how would i use

game.Players:GetPlayers () and math.random to select a player and give him a tool depending on the class?

my script so far is this

local classes = {
"Executioner";
"Civilian"
}

r = math.random(1,2)
m = Instance.new("Message")


while true do
if r == 1 then
wait(10)
m.Parent = workspace
m.Text = "A New Round Is Starting"
wait(3)
m.Text = "The new nap is (map name)"
wait(2)
m.Parent = nil
game.Lighting.(map name):Clone.Parent = Game.Workspace

end
end
Report Abuse
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 10:00 AM
b
Report Abuse
warycapdecutie is not online. warycapdecutie
Joined: 13 Aug 2010
Total Posts: 14373
01 Feb 2015 10:05 AM
Lighting isn't as reliable as serverstorage.


also, use

plrs = game.Players:GetChildren()

randomplayer = plrs[math.random(1,#plrs)]
Report Abuse
kingbeast786 is not online. kingbeast786
Joined: 27 Nov 2013
Total Posts: 2162
01 Feb 2015 10:15 AM
thx for the help.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image