#How to make a time bar?
1 messages · Page 1 of 1 (latest)
Do u mean a timer?
Like you know the health bar
It goes left when we got attacked
Something like that
But as time
No any digital numbers
** You are now Level 4! **
Just add healthchanged function()
Oh
Goes left and it becomes totally green in 5 seconds
On the gui
Yes gui
Tweenservice
I will try thanks
Yea search up tween service tutorials on yt or smth
But with that service
It should go only left
Timer as in debounce?
It will go to both sides if i do it
Like when you punch you have to wat 3 seconds to punch again
Yes but with gui
And the bar is to visualize the time
Make a variable that decreases value and set the gui size to the variable
Tweenservice isnt procedual tho
Okay one minute
Make a frame with the size you want, then put the bar inside of the frame and set size to 1,0,1,0 then set the size like this
Frame.Size = Udi2m.new(DB, 0, 1, 0)
Then just decrease «DB» as the timer goes down
its pretty hard to program on phone lol, I tried at least
Lol
i forgot the wait
Kind of lagging but working
Lagging as is like in updating slow or as in the script lagging the game out?
You can use tweenservice if it is laggy. Then just adjust the tween length to the debounce, then use tween.completed:wait() to wait until the debounce is finished
Wtf like did you get logged out of ur roblox acc for using tweenservice lol?
I made it thanks again
add prints or use a breakpoint
basically you need to reduce everything to a range between 0~1 and have some function that takes a 0~1 range and resizes a ui frame from its min width (0) to its max width (1*size_width) and idk maybe put it on a background with some uicorners and there you have a healthbar or whatever progress bar 👍 in many ways you can think of a healthbar as like a progressbar except instead of 0% to 100% progress it instead shows health at 0% health (dead) to 100% health (full hp)
Thanks
you can just change the anchorpoint
to one side