What do you want to achieve?
I want to make an “Thirst Bar”
What is the issue?
It gives me an error: “Unable to cast value to function”
What solutions have you tried so far?
I tried looking on youtube and developer forum but I can’t find the solution.
local Player = game.Players.LocalPlayer
local Thirst = Player:WaitForChild("Thirst")
local BarExterior = script.Parent
local BarInterior = BarExterior.BarInterior
local function UpdateThirst()
local CurrentValue = Thirst.Value
local Formula = math.clamp(CurrentValue/100, 0, 1)
BarInterior:TweenSize(UDim2.new(Formula, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0,8, true)
end
UpdateThirst()
Thirst.Changed:Connect(function()
UpdateThirst()
end)
Give me a second, It’s just that I dont use :TweenSize() since it has more limitations than tween service so let me go and read the documentation again.