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

having trouble resizing a imagelabel?

Asked by 2 years ago
Edited 2 years ago

So I have a healthbar with the inside being a imagelabel when I resize the imagelabel it squish's the image I want it to kinda remove a bit off the side how could I achieve this?

the script that changes the size

local Mob = script.Parent.Parent.Parent:FindFirstChild("Humanoid")

while true do
    wait(0.1)

    local pie = (Mob.Health / Mob.MaxHealth)
    script.Parent.SurfaceGui.Frame.Frame.potato.Size = UDim2.new(pie, 0, 1, 0)
end

idk how to add a image

0
create a Frame which you will resize and put the ImageLabel inside it, make sure the Frame has ClipsDescendants set to true and instead of resizing the image you resize the frame and it will clip the image without stretching, https://developer.roblox.com/en-us/api-reference/property/GuiObject/ClipsDescendants imKirda 4491 — 2y
0
i worked thank you Bubble_GumRoblox 19 — 2y
0
is there a way for it to clip the other side instead Bubble_GumRoblox 19 — 2y

Answer this question