|
| 10 Aug 2011 09:00 PM |
------- Script: ------- while true do wait() for i = 1,#game:GetPlayers() do clone = game.Lighting.BombGUI:clone() clone.Parent = game:GetPlayers()[i] end end for i = 1, 0, -.1 do clone.Frame.BackgroundTransparency = i wait() end wait(3) for i = 1, 0, -.1 do clone.Frame.Text.TextTransparency = i wait() end wait(7) while true do wait() for i = 1,#game:GetPlayers() do players = game.GetPlayers() players.Humanoid.Health = 0 end end for i = 0, 1, .1 do clone.Frame.Text.TextTransparency = i wait() end for i = 0, 1, .1 do clone.Frame.BackgroundTransparency = i wait() end ------------------------------- What's supposed to happen ------------------------------- All the players have a GUI that pops up, then all the players die. -------- Output -------- GetPlayers is not a valid member of DataModel
|
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 10 Aug 2011 09:01 PM |
| #game:GetService("Players"):GetPlayers() |
|
|
| Report Abuse |
|
|
aboy5643a
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 2785 |
|
|
| 10 Aug 2011 09:02 PM |
#game.Players:GetPlayers()
~Post here if you're Viet Namese, Canadian or Chinese. I'm from these 3 places. - Some confused kid from Language Center ~ |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 09:02 PM |
| Just one question, since when did you search for players in the "game" data model? game.Players:GetPlayers() |
|
|
| Report Abuse |
|
|
aboy5643a
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 2785 |
|
|
| 10 Aug 2011 09:03 PM |
Getting the player service is more lengthy than just using the child of game... Always use the object over the service :P
~Post here if you're Viet Namese, Canadian or Chinese. I'm from these 3 places. - Some confused kid from Language Center ~ |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 10 Aug 2011 09:04 PM |
What if he renamed the Players? Or this was being used in a free model and someone could've renamed players?
Possibly less efficient, but more reliable. |
|
|
| Report Abuse |
|
|
| |
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 10 Aug 2011 09:11 PM |
game:GetPlayers()[i]
You have to change it here too. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 09:28 PM |
| Where do I change that to? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 09:53 PM |
bump Someone please answer my question above :O |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 10 Aug 2011 09:56 PM |
| game:GetService("Players"):GetPlayers()[i] |
|
|
| Report Abuse |
|
|