So, im trying to make a bar that drains after a bit of time and it is getting smaller instead of draining from the right to the left and im having trouble fixing it so here are the scripts and a representation to help
assistant didnt help either:sob:
2 Likes
Is the variable frame
pointing towards the green bar or the dark one ?
Idk what you mean by “draining”, doesn’t it basically mean to shrink the frame? I’d rather use this script
local percentage = 100
local TI = TweenInfo.new(.1,Enum.EasingStyle.Linear, Enum.EasingDirection.In)
repeat
percentage -= sinkrate
TS:Create(frame, ti, {Size = Udim2.fromScale(percentage /100,1):Play()
task.wait()
until
frame.Size.X.Scale < sinkrate
pahreh619
(Plehlowla)
August 20, 2024, 10:55pm
#4
might want to check the ui anchor point, that could also be the problem, either set it to 0 or 0.5 on the x and y scale.
I don’t think there’s anything wrong with the anchor point since it’s draining from right to left like he wants
The problem might come from the third parameter in UDim2.new() : try replacing frame.Size.Y.Scale by a fixed value like 1, or .8
It is pointing towards the green bar
Bikereh
(green_lady)
August 20, 2024, 11:19pm
#8
it looks like you have a ui aspect ratio inside the frame instance, delete it and it will be fixed
system
(system)
Closed
September 3, 2024, 11:20pm
#9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.