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

Trying to get a health GUI to tween, I think my math is wrong?

I have a heart as my health GUI and I had this idea that doubling the size would work but it only works when the frame its inside is at.5 size.

The way I am trying to do this is I have a frame and then the heart inside the frame. The frame has clip-descendants turned on so it makes it look like the heart is getting cut off.

I cant just change the size of the heart because that wouldnt clip it and give it the appearance of it getting cut off.

Heres how it looks if I dont cut it off

https://gyazo.com/0a9f752b182389ecb38fa01a5fe1f292

But it doesnt seem to be working. Here is a gif and the code :)

https://gyazo.com/aaa4ba68ff3c4f0dba57d0531a896b4f

	HealthFrame.Outline.HeartFrame.Heart.Size = UDim2.new(HealthFrame.Outline.HeartFrame.Size.X.Scale * 2, 0, 1, 0)

Anyone have any ideas? I am almost 100% sure I am doing my math wrong. But thank you and have a good day :)

1 answer

This is just the size part.

UDim2.new(0, Humanoid.Health/Humanoid.MaxHealth, 1,0)

1 comment

0

Here I edited it can you look at it again, I just put the line in there that is causing problems

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