Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this TweenSize script go Up instead of Left?

Asked by 8 years ago

Can someone tell me why this TweenSize script for a HealthBar make's the Frame go Up instead of Left?

local player = game:GetService("Players").LocalPlayer
local char = player.Character
local text = script.Parent:WaitForChild("Text")
local frame = script.Parent:WaitForChild("ColorFrame")

char.Humanoid.Changed:connect(function()
    frame:TweenSize(UDim2.new(0,2*char.Humanoid.Health,0,0),"Out","Quad",0.2)
    text.Text = "Health: "..char.Humanoid.Health.." / "..char.Humanoid.MaxHealth
end)

Answer this question