-
What do you want to achieve? Keep it simple and clear!
So basically, currently i’m working on achievements system(which gives boost for finishing), exactly now i’m making an progress bar -
What is the issue? Include screenshots / videos if possible! For some reason it works very dumb, here is screenshot:
Teal is an Progress -
What solutions have you tried so far? Did you look for solutions on the Developer Hub? Exactly i was trying modifying script a bit, but made it working worse(it was giving inf%)
Here is code:
local Bar = script.Parent
local ProgressText = script.Parent.Parent.TextLabel
local Player = game.Players.LocalPlayer
local TotalCoal = Player.TotalFolder.TotalCoal
local Ach4Goal = Player.Stats.Ach4Goal
local Progress = math.round(Ach4Goal.Value/TotalCoal.Value)
print(Progress)
ProgressText.Text = Progress.."%"
Bar:TweenSize(UDim2.new(Progress,0,1,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.5, true)
TotalCoal.Changed:Connect(function()
Progress = math.round(Ach4Goal.Value/TotalCoal.Value)
ProgressText.Text = Progress.."%"
Bar:TweenSize(UDim2.new(Progress,0,1,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.5, true)
end)