Created
December 17, 2023 20:04
-
-
Save acs/14ac9eebdeef7d7a6ea76939f4c04c8b to your computer and use it in GitHub Desktop.
Decrease the size of an object in Roblox (progress bar)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Adjusting recharge bar") | |
local visibleBar = script.Parent.Parent.Parent | |
local bar = script.Parent | |
local totalSeconds = 5 | |
local stepSize = bar.Size.X.Offset/totalSeconds | |
repeat | |
task.wait(1) | |
bar.Size = UDim2.new(0, bar.Size.X.Offset-stepSize, 0, bar.Size.Y.Offset) | |
until bar.Size.X.Offset < 0 | |
visibleBar.Enabled = false | |
print("Size configured!!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment