I'm having trouble resizing a union via a script. I'm aware that a union's size must stay consistent and can't be squashed and stretched like a mesh, however, what I'm looking for is to replicate resizing a union like how you could using studio's resize tool, shown visually here.
I've tried the :Resize function that's inside BaseParts in order to resize just a singular face, but since a union's size needs to remain consistent, it didn't do anything differently. And I can't find a way to move the part backwards along with resizing, since the part in question is welded to a tool handle, and its position gets finicky. Any suggestions?
Here's the relevant script:
for i = 1, 20 do
character.Battery.Value = character.Battery.Value - 1
wait(1)
local light = character.Flashlight.Handle2
character.Flashlight.Handle2.Size = Vector3.new(light.Size.X, character.Battery.Value / 10, light.Size.Z)
end
