Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make this open when a boss's health is zero?

The boss's name is "Boss" and his humanoid is named "Humanoid" and he is also in Workspace. If anyone can help me, it'd mean a lot to me.

while true do

		for i=1,20 do
			script.Parent.Parent.Lock3.CFrame = script.Parent.Parent.Lock3.CFrame * CFrame.new(0, 1, 0)
			script.Parent.Parent.Lock4.CFrame = script.Parent.Parent.Lock4.CFrame * CFrame.new(0, -1, 0)
			wait(0.01)
		end

		for i=1,20 do
			script.Parent.Parent.Lock3.CFrame = script.Parent.Parent.Lock3.CFrame * CFrame.new(0, -1, 0)
			script.Parent.Parent.Lock4.CFrame = script.Parent.Parent.Lock4.CFrame * CFrame.new(0, 1, 0)
			wait(0.01)
		end
end

1 answer

✓ Accepted answer
if game.Workspace.Boss.Humanoid.Health == 0 then



        for i=1,20 do
            script.Parent.Parent.Lock3.CFrame = script.Parent.Parent.Lock3.CFrame * CFrame.new(0, 1, 0)
            script.Parent.Parent.Lock4.CFrame = script.Parent.Parent.Lock4.CFrame * CFrame.new(0, -1, 0)
            wait(0.01)
        end

        for i=1,20 do
            script.Parent.Parent.Lock3.CFrame = script.Parent.Parent.Lock3.CFrame * CFrame.new(0, -1, 0)
            script.Parent.Parent.Lock4.CFrame = script.Parent.Parent.Lock4.CFrame * CFrame.new(0, 1, 0)
            wait(0.01)
        end
wait()






end

Also Health is property of Humanoid if it helps.

+1 if helped.

2 comments

0

Doesn't appear to work.

0

Should now.

This discussion is preserved as it was. New answers, comments, and votes are closed.