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
|
  |
| Joined: 13 Aug 2013 |
| Total Posts: 252 |
|
| |
|
|
| 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 |
|
|