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: Making a block a disappear after being blown up by a bomb

Previous Thread :: Next Thread 
zeltabyte is not online. zeltabyte
Joined: 11 Jun 2010
Total Posts: 4
29 Nov 2015 03:09 AM
How would I make a block disappear after taking enough damage?
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
29 Nov 2015 03:12 AM
Assuming you have a health value in the block, and the bomb damages it...

HealthValue.Changed:connect(function()
if HealthValue.Value <= 0 then

--One of these.
Block:Destroy();
Block.Transparency = 1;

end
end)

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
zeltabyte is not online. zeltabyte
Joined: 11 Jun 2010
Total Posts: 4
29 Nov 2015 04:10 AM
I can't seem to get it to work, here's a screen shot of how I have it set up. https://i.gyazo.com/5ffd590d149f739b21c1df6595d667a1.png Thanks!
Report Abuse
AviatorJake is not online. AviatorJake
Joined: 30 Jan 2014
Total Posts: 1528
29 Nov 2015 04:19 AM
Maybe you should change the body to "Can anyone give me a script" instead of "How"
Report Abuse
zeltabyte is not online. zeltabyte
Joined: 11 Jun 2010
Total Posts: 4
29 Nov 2015 04:27 AM
Probably should've
Report Abuse
AviatorJake is not online. AviatorJake
Joined: 30 Jan 2014
Total Posts: 1528
29 Nov 2015 04:28 AM
while true do
wait()

if script.Parent.Humanoid.Health <= 0 then
script.Parent.Transparency = 0
script.Parent:Destroy()
end
end
Report Abuse
AviatorJake is not online. AviatorJake
Joined: 30 Jan 2014
Total Posts: 1528
29 Nov 2015 04:31 AM
Remove the transparency part, doesnt do nothing

while true do
wait()

if script.Parent.Humanoid.Health <= 0 then
script.Parent:Destroy()
end
end

Should work
Report Abuse
zeltabyte is not online. zeltabyte
Joined: 11 Jun 2010
Total Posts: 4
29 Nov 2015 05:08 PM
Tried and it didn't work, not sure why, It looks fine to me.
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