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: So..

Previous Thread :: Next Thread 
ggfunny1234 is not online. ggfunny1234
Joined: 09 Jul 2010
Total Posts: 3432
29 Dec 2011 07:45 PM
Let's say I wanted to make a GUI that detected when a player had died (Their health has reached 0)

1.) Would I need a localscript, or just a script? (I know this may sound like I'm going insane, [which I think I am], but what's the difference between the two?)

2.) I'm a strong enforcer of the rule "No requests" myself, but could someone at least give me the backbone of what I need to do? I tried already, but output didn't display anything about it, as if nothing were wrong, but the script didn't work. Here it is.

game.Players:GetChildren(function(plrs)
while true do
for i = 1, #plrs do
if plrs[i].Humanoid.Health = 0 then
script.Parent.Frame.TextLabel.Text = "Someone has died!"
end
end
end
end)

-- I plan on adding a line that finds the name of the dead player, and displays it, but I want to get this part working first.

If you can help, great. If you can't, gobiey. ;]
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 07:47 PM
game.Players.PlayerAdded:connect(function(plr)
plr.Character.Humanoid.Died:connect(function()
script.Parent.Frame.TextLabel.Text = plr.Name.." Has died!"
end) end)

R.I.P Ben Breedlove.
Report Abuse
ggfunny1234 is not online. ggfunny1234
Joined: 09 Jul 2010
Total Posts: 3432
29 Dec 2011 07:48 PM
Thank you so much biker! :]
Report Abuse
ggfunny1234 is not online. ggfunny1234
Joined: 09 Jul 2010
Total Posts: 3432
29 Dec 2011 07:51 PM
.. Errm.. Not sure why, (Output says nothing? D:) but that's not working...
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