Voidition
|
  |
| Joined: 14 Jul 2012 |
| Total Posts: 1849 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 31 Mar 2014 11:43 AM |
| http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2014 11:48 AM |
I don't really understand what your saying? Do you need a list of players?
Players = { }
local function updatePlayers() for _, Player in pairs(game.Players:GetPlayers() Players[#Players + 1].Value = Player end end
game.Players.ChildAdded:connect(updatePlayers()) game.Players.ChildRemoved:connect(updatePlayers())
for i = 1, #Players do print(Players[i].Name) end |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 31 Mar 2014 11:50 AM |
| she needs help with if statements. |
|
|
| Report Abuse |
|
|
Voidition
|
  |
| Joined: 14 Jul 2012 |
| Total Posts: 1849 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 31 Mar 2014 12:01 PM |
doesn't matter. Learn to script. its useful. |
|
|
| Report Abuse |
|
|
Voidition
|
  |
| Joined: 14 Jul 2012 |
| Total Posts: 1849 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 31 Mar 2014 12:09 PM |
it already is.
Only the script gets activated when the if is true. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2014 12:11 PM |
| Shut up vlekje... Don't be rude, I assume you he is far more advanced then you. |
|
|
| Report Abuse |
|
|
Voidition
|
  |
| Joined: 14 Jul 2012 |
| Total Posts: 1849 |
|
| |
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 31 Mar 2014 12:22 PM |
| I don't understand the question. |
|
|
| Report Abuse |
|
|
iYoshiFox
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 1058 |
|
|
| 31 Mar 2014 12:35 PM |
An If statement runs on true or false. First, the things that should be used are:
== - Equal to ~= - Not Equal to >= - Bigger than or Equal to <= - Smaller than or Equal to < - Smaller than > - Bigger than
Next, try this
if 1 == 2 then --This is not true. 1 is not equal to 2. so it would return false and not run whats in the 'if' --If 1 is equal to 2 end
If you wanted to do an if else, for example, if 1 isn't equal to 2 then do somthing else..
if 1 == 2 then --If 1 is equal to 2 else --If 1 is not equal to 2 end
You can also do this:
if 1 == 2 then --If 1 is equal to 2 elseif 1 == 3 then --If 1 is equal to 3 but not 2 else --If 1 is not equal to 2 or 3
Do you get it? end |
|
|
| Report Abuse |
|
|
Voidition
|
  |
| Joined: 14 Jul 2012 |
| Total Posts: 1849 |
|
| |
|
iYoshiFox
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 1058 |
|
|
| 31 Mar 2014 12:39 PM |
^^^^^^^^^^^^^
Wow, I was trying to help.
You could at least have said, 'Thanks for that.. But I need.. |
|
|
| Report Abuse |
|
|
Voidition
|
  |
| Joined: 14 Jul 2012 |
| Total Posts: 1849 |
|
| |
|
iYoshiFox
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 1058 |
|
|
| 31 Mar 2014 12:43 PM |
| Sorry, But I still find it ungreatfull. I spent 10 minutes writing that, I shouldn't have had to say you should say thank you. Im sorry But Im not helping you now. Yes I do know how to do what you want. |
|
|
| Report Abuse |
|
|
Voidition
|
  |
| Joined: 14 Jul 2012 |
| Total Posts: 1849 |
|
| |
|
iYoshiFox
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 1058 |
|
|
| 31 Mar 2014 12:47 PM |
Ugh.. Im just too kind.
local last = game.Players.NumPlayers
while wait() do repeat wait() until last < game.Players.NumPlayers last = game.Players.NumPlayers print("A player has left") end |
|
|
| Report Abuse |
|
|