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: SCRIPTING HELP

Previous Thread :: Next Thread 
MrLegal is not online. MrLegal
Joined: 13 Aug 2013
Total Posts: 252
02 Aug 2015 12:30 AM
I neeed to make a door go transparent and cancollide false when a part is damaged and left with 0 health
what I got so far:

health = game.Workspace.Model.Humanoid.Health
door = game.Workspace.Door

if health == 0 then
door.Transparency = 1
door.CanCollide = false
end


idk why it doesnt work
help?
Report Abuse
MrLegal is not online. MrLegal
Joined: 13 Aug 2013
Total Posts: 252
02 Aug 2015 12:33 AM
cmon
Report Abuse
Barbariancreep is not online. Barbariancreep
Joined: 23 Nov 2012
Total Posts: 1096
02 Aug 2015 01:00 AM
because you're only checking for the health once

humanoid = game.Workspace.Model.Humanoid
door = game.Workspace.Door

humanoid.Health.Changed:connect(function()
if humanoid.Health <= 0 then
door.Transparency = 1
door.CanCollide = false
else
door.Transparency = 0
door.CanCollide = true
end
end)

don't try changing it that should work


~ Whoa check this out! -{ http://web.roblox.com/My/Groups.aspx?gid=2630388 }-
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