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 » Scripting Helpers
Home Search
 

Re: Help With This Script

Previous Thread :: Next Thread 
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
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 is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
10 Aug 2011 09:01 PM
#game:GetService("Players"):GetPlayers()
Report Abuse
aboy5643a is not online. 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
leolion113 is not online. leolion113
Joined: 11 Oct 2008
Total Posts: 3336
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 is not online. 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 is not online. 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
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
10 Aug 2011 09:10 PM
It didn't work :(
Report Abuse
swmaniac is not online. 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
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
10 Aug 2011 09:28 PM
Where do I change that to?
Report Abuse
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
10 Aug 2011 09:53 PM
bump
Someone please answer my question above :O
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
10 Aug 2011 09:56 PM
game:GetService("Players"):GetPlayers()[i]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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