I have a basic tween function, but every time I run it it errors with: "Unable to cast double to TweenInfo". I know that I'm supposed to have a float there, but I need help turning the input into a float.
The function:
function tween1(object,t,property,value)
local t = tonumber(t)
local goal = {}
goal[property] = value
local tweenInfo = TweenInfo.new(t)
local tween = tweenService:Create(object, t, goal)
tween:Play()
end
How I call the function:
tween1(bar,0.25,"Size",UDim2.new(health / maxHealth, 0, 1, 0))
