How do I make an event that triggers this script when this humanoid doors health is less than 1? Would mean alot since most of my scripts are based on one of the "objects" value.
Heres The Script:
name = "Humanoid"
Vault = script.Parent:clone()
while true do
wait(0.5)
if script.Parent.Humanoid.Health < 1 then
remote.OnServerEvent:connect(function(Player)
game.Workspace["Vault Door"].Head.Part.Transparency = 1
game.Workspace["Vault Door"].Head.Size = Vector3.new(0.05, 0.05, 0.05)
game.Workspace["Vault Door"].Head.Part.Size = Vector3.new(0.05, 0.05, 0.05)
game.Workspace.Alarm:Play()
wait(60)
game.Workspace.Alarm:Stop()
robot = Vault:clone()
robot.Parent = script.Parent.Parent
robot:makeJoints()
script.Parent:remove()
#
#game.Workspace["Vault Door"].Head.Part.Transparency = 0
game.Workspace["Vault Door"].Head.Size = Vector3.new(0.6, 9.4, 10)
game.Workspace["Vault Door"].Head.Part.Size = Vector3.new(3.9, 10.2, 10.8)
game.Workspace["Vault Door"].Humanoid.MaxHealth = 100000000.000
game.Workspace["Vault Door"].Humanoid.Health = 100000000.000
wait(240)
game.Workspace["Vault Door"].Humanoid.MaxHealth = 700
game.Workspace["Vault Door"].Humanoid.Health = 700
end
end
|