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 » Scripters
Home Search
 

Re: Script Help

Previous Thread :: Next Thread 
ferano is not online. ferano
Joined: 23 Nov 2008
Total Posts: 5094
25 Mar 2016 12:11 PM
What's wrong with this script?

game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=143384769")

wait()

local lasthealth = {}
local f = function(humanoid)
lasthealth[humanoid] = humanoid.Health
humanoid.HealthChanged:connect(function(prop)
if prop == "Health" then
local lh = 0
pcall(function()
lh = lasthealth[humanoid] or 0
end)
if lh < humanoid.Health then
script.Sound:play()
end
end
end)
end
Report Abuse
ferano is not online. ferano
Joined: 23 Nov 2008
Total Posts: 5094
25 Mar 2016 12:56 PM
Bump
Report Abuse
ferano is not online. ferano
Joined: 23 Nov 2008
Total Posts: 5094
25 Mar 2016 01:45 PM
bump
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
25 Mar 2016 01:58 PM
HealthChanged is called upon when the health is changed. Saying if it is Health is unnecessary. Also, I do not see where you called the first function at, nor do I see what "humanoid" is referring to.
Report Abuse
ferano is not online. ferano
Joined: 23 Nov 2008
Total Posts: 5094
25 Mar 2016 09:00 PM
bump
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
25 Mar 2016 11:26 PM
When I said that I do not see something, I am saying that you should show more of the script to show what I do not see
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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