Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 5 years ago
Edited 5 years ago

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

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

This is just the size part.

UDim2.new(0, Humanoid.Health/Humanoid.MaxHealth, 1,0)
0
Here I edited it can you look at it again, I just put the line in there that is causing problems GottaHaveAFunTime 218 — 5y
Ad

Answer this question