I trying to make a ultimate bar gui

I trying to make a ultimate bar gui so this is my gui look like
image
image

and this is my script

local Player = game:GetService("Players").LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()

local ultvalue = char:WaitForChild("UltimateValue").Value
local ultmax = char:WaitForChild("UltimateMax").Value

while true do
	task.wait(.5)

	local endSize = UDim2.new(ultvalue / ultmax, 0,1,0)

	script.Parent.UltimateBackground.UltimateBar:TweenSize(endSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
end

but idk why the gui is not tweening , the gui wont tween when the ultvalue changed

local ultvalue = char:WaitForChild("UltimateValue").Value
local ultmax = char:WaitForChild("UltimateMax").Value

Get rid of .Value here.

ultvalue / ultmax

Index .Value here.

local Player = game:GetService("Players").LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()

local ultvalue = char:WaitForChild("UltimateValue")
local ultmax = char:WaitForChild("UltimateMax")

while true do
	task.wait(.5)

	local endSize = UDim2.new(ultvalue.Value / ultmax.Value, 0,1,0)

	script.Parent.UltimateBackground.UltimateBar:TweenSize(endSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
end
1 Like