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
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.