adandee
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 231 |
|
|
| 01 Jun 2015 12:32 AM |
game.Players.PlayerAdded:connect(function(Player) game.Players.Value = 1 local m = Instance.new('Message', workspace') m.Text = 'This game has to have 5 people in order to start' then if game.Players.Value <= 5 then m:Destroy() end end
There's no output, but it doesn't work.
help pls. |
|
|
| Report Abuse |
|
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Jun 2015 12:34 AM |
2) There is no Value property of the Players service. 3) Extra quote after workspace 4) random then that shouldn't be there 5) See #2 7) Missing ')' |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Jun 2015 12:34 AM |
| The last one is on line 8, not line 7. I can't count |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2015 12:34 AM |
^ He's clearly trying to get the player named Value. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
adandee
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 231 |
|
|
| 01 Jun 2015 12:40 AM |
I don't get the NumPlayers event.
Can you guys link me to the wiki page? |
|
|
| Report Abuse |
|
|
adandee
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 231 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Jun 2015 12:42 AM |
| It's not an event, it's a property. |
|
|
| Report Abuse |
|
|
Tokimonu
|
  |
| Joined: 18 Sep 2009 |
| Total Posts: 643 |
|
|
| 01 Jun 2015 01:12 AM |
You're the person that wrote the incorrect script on the other forum. Well, here, here's the fixed version:
game.Players.PlayerAdded:connect(function(Player) if game.Players.NumPlayers == 1 then local m = Instance.new("Message", game.Workspace) m.Text = "This game has to have 5 people in order to start." while wait() do if game.Players.NumPlayers <= 5 then m:Destroy() end end end end)
r̙̠̞̮̟͕̠e̙̖̱̞͍͎̺a̟̞͖͚͉̮lí̘̖̻t҉̜̬̥̼̝̳y̯̝ ̛͍̦͎͉̙iş̪͉̜͓̞ ̺̲͈̪͍̟͜an̙̤ ̴͈ͅi̘͕̗͈̖̹l̹l̥̻̀u̜͈͍s͏̣͖͍̺i̥̪̟ơṋ̼͇ ͕̙̳̝a͇͍͍͝n̤̪d̛͓͓̫ ͈̝̕t̹̝̦h̰͎̺̘͎͞e̢̤̭͈̲ ̦̹̠̰ụ̶̟͚͓̣n͔̦͕̳i͏̪̞ve҉̤̮͓͎̺r҉̗̫̬s̻̹͉̟ȩ̖̻ i͇̯̦̤̝͓͘ͅs̛̫̻͍̦̝̠̪ ̸̬͚a̷̻͈̫̦̦ ̬͙̫̺͉h̬̩̲̻̳̱o̙̺̥̝̪̭͇l͘o̤͔̜̹̭g̻͖̟̳̹̱ṛ̨͓̜͇̦a͏͕̞̞m͈̦̱̣̫̣ |
|
|
| Report Abuse |
|
|
Tokimonu
|
  |
| Joined: 18 Sep 2009 |
| Total Posts: 643 |
|
|
| 01 Jun 2015 01:13 AM |
wait don't use that that's broken, fixing
r̙̠̞̮̟͕̠e̙̖̱̞͍͎̺a̟̞͖͚͉̮lí̘̖̻t҉̜̬̥̼̝̳y̯̝ ̛͍̦͎͉̙iş̪͉̜͓̞ ̺̲͈̪͍̟͜an̙̤ ̴͈ͅi̘͕̗͈̖̹l̹l̥̻̀u̜͈͍s͏̣͖͍̺i̥̪̟ơṋ̼͇ ͕̙̳̝a͇͍͍͝n̤̪d̛͓͓̫ ͈̝̕t̹̝̦h̰͎̺̘͎͞e̢̤̭͈̲ ̦̹̠̰ụ̶̟͚͓̣n͔̦͕̳i͏̪̞ve҉̤̮͓͎̺r҉̗̫̬s̻̹͉̟ȩ̖̻ i͇̯̦̤̝͓͘ͅs̛̫̻͍̦̝̠̪ ̸̬͚a̷̻͈̫̦̦ ̬͙̫̺͉h̬̩̲̻̳̱o̙̺̥̝̪̭͇l͘o̤͔̜̹̭g̻͖̟̳̹̱ṛ̨͓̜͇̦a͏͕̞̞m͈̦̱̣̫̣ |
|
|
| Report Abuse |
|
|
Tokimonu
|
  |
| Joined: 18 Sep 2009 |
| Total Posts: 643 |
|
|
| 01 Jun 2015 01:14 AM |
game.Players.PlayerAdded:connect(function(Player) if game.Players.NumPlayers == 1 then local m = Instance.new("Message", game.Workspace) m.Text = "This game has to have 5 people in order to start." while wait() do if game.Players.NumPlayers >= 5 then m:Destroy() end end end end)
There ye go.
r̙̠̞̮̟͕̠e̙̖̱̞͍͎̺a̟̞͖͚͉̮lí̘̖̻t҉̜̬̥̼̝̳y̯̝ ̛͍̦͎͉̙iş̪͉̜͓̞ ̺̲͈̪͍̟͜an̙̤ ̴͈ͅi̘͕̗͈̖̹l̹l̥̻̀u̜͈͍s͏̣͖͍̺i̥̪̟ơṋ̼͇ ͕̙̳̝a͇͍͍͝n̤̪d̛͓͓̫ ͈̝̕t̹̝̦h̰͎̺̘͎͞e̢̤̭͈̲ ̦̹̠̰ụ̶̟͚͓̣n͔̦͕̳i͏̪̞ve҉̤̮͓͎̺r҉̗̫̬s̻̹͉̟ȩ̖̻ i͇̯̦̤̝͓͘ͅs̛̫̻͍̦̝̠̪ ̸̬͚a̷̻͈̫̦̦ ̬͙̫̺͉h̬̩̲̻̳̱o̙̺̥̝̪̭͇l͘o̤͔̜̹̭g̻͖̟̳̹̱ṛ̨͓̜͇̦a͏͕̞̞m͈̦̱̣̫̣ |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Jun 2015 02:31 AM |
| (Inefficient) and possibly not right, I didn't completely check it |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2015 02:32 AM |
| (I don't know I just felt like saying right) |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2015 02:35 AM |
| it looks ok but I would not say if == 1 because if two players join at the same time maybe some lag and boom the scripts looking for 1 when their is two so I would recommend <= 4 |
|
|
| Report Abuse |
|
|
adandee
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 231 |
|
|
| 01 Jun 2015 11:09 AM |
@Toki you have no room to talk now, you just made the biggest error on the easiest thing ever.
game.Players.PlayerAdded:connect(function(Player) if game.Players.NumPlayers == 1 then local m = Instance.new("Message", game.Workspace) m.Text = "This game has to have 5 people in order to start." while wait() do if game.Players.NumPlayers >= 5 then m:Destroy() end end end end)
("Message", game.Workspace) - It's ('Message', workspace) I've used this many times.
Also it's not while wait() do, It's while wait do
K that's all.
Oh wait, Also here is the fixed one of the "Fixed" but broken script you gave me.
game.Players.PlayerAdded:connect(function(Player) if game.Players.NumPlayers == 1 then local m = Instance.new('Message', workspace) m.Text = "This game has to have 5 people in order to start." while wait do if game.Players.NumPlayers >= 5 then m:Destroy() end end end end) |
|
|
| Report Abuse |
|
|
szss
|
  |
| Joined: 25 Jun 2012 |
| Total Posts: 81 |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 01 Jun 2015 11:30 AM |
| Do you not suppose Roblox will flip out if you try to :Destroy() an Instance that's already Destroyed? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Jun 2015 02:33 PM |
| It'll probably just say it's locked, since isn't that what destroy does? |
|
|
| Report Abuse |
|
|