So I was making a boss fight script, but I ran into a problem. When the bosses hp gets to 49 and lower his second form starts. But I need to check for his hp getting low while running his regular attacks.

while wait() do
	if script.Parent.Parent.Heath  >  50 then
		-- do part one
	else
		--do part two
	end
end

5 comments

0

and there's some waits here and there

0

You could use the humanoid health changed event to set a property like attack style 1. then just use the property so you dont need to check its hp stat

0

Have you noticed you typed "Heath"?

0

If you really want to use two loops then you can use threadding http://wiki.roblox.com/index.php?title=Threading but i would not reccomend it for this

0

Does your boss have a Humanoid ?