I want to tween an ultimate bar for a fighting game, and make its x offset the value of a number value, i checked the number value and it changes, but i dont know how to script the tween for the gui, here is my script that I have issues with
local plr = game.Players.LocalPlayer
plr.CharacterAdded:Wait()
local char = plr.Character
local gui = script.Parent
local ultmeter = char:WaitForChild("UltMeter")
local value
game:GetService("RunService").Heartbeat:Connect(function()
value = ultmeter.Value
game:GetService("RunService").Heartbeat:Wait()
end)
game:GetService("RunService").Heartbeat:Connect(function()
gui:TweenSize(UDim2.new(0, value, 60, 0),"In","Linear",0.3)
game:GetService("RunService").Heartbeat:Wait()
end)