Hello, Im OriginalDevelops, Im trying to make levels system but I have an problem with lever Gui, Im trying to make a bar that showing up percent to next levels but the Gui always tween like in the picture :
So how can I make the Gui only tween to right? Are there any ideas about this?
Local Script
local player = game.Players.LocalPlayer
local bar = script.Parent
local exp = player:WaitForChild("Exp")
local levels = player:FindFirstChild("leaderstats"):WaitForChild("Levels")
while wait() do
script.Parent:TweenSize(UDim2.new((exp.Value/(100 * (levels.Value + 1))), 0,1,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3)
end
1 Like
Is the yellow bar a children of the black bar?
1 Like
What do you mean? Can you explain more about it?
Hmm this is strange, mine works normally. Can you show me the explorer?
1 Like

I dont have any idea about this…
Is its position 0,0,0,0
(sorry for asking so many question)
Ist not your fault, is’t my fault cause Im bad at scripting and this is the position : {0.021, 0},{0.477, 0}, the default size : {0.036, 0},{1, 0}
Forget what I just said. Is Rotation of the yellow bar 0?
I think I know your problem. Try setting AnchorPoint to 0,0.
3 Likes
Probably bad practice to be retrieving exp from client rather than server back to client.
Hopefully your exp value or level value isn’t negative?
If you want to always make it go to the right (even though it should be, plus it’s unnecessary) just clamp it to not be negative like this:
math.clamp(udim2 x value here, 0, insert max number)
You could try multiplying it by a negative to reverse the left direction (negative) but it’d be weird and you’re better off with it working in the first place.
Try sending the stuff in a file maybe for testing?
1 Like
Sorry it’s solved, and the script work fine, the thing that make the script dead is the anchor points 