local SBar = script.Parent:WaitForChild("BackG"):WaitForChild("SBar") while _G.Stamina > 0 and wait(.1) do print "test" SBar:TweenSize(UDim2.new(0, _G.Stamina/100, 0, 1, 0), "Out", "Quint", .1, true) end
Hello wowie, my name is Swift. I am here to help you:
I have expected errors:
1: There are 5 arguments in UDim2.new()
2: I recommended using only one :WaitForChild()
3: I recommended not to shortcut 0.1
4: If the GUI was already in the player's screen, with that configuration, the GUI will disappear almost immediately, if you want it to go out from the user's screen; please use 'In'; but from my consideration; the GUI must be some sort of bar; so you can use out. You might want to fix "0.1" speed though, it's too fast.'
This might be the fixed version.
local SBar = script.Parent.BackG:WaitForChild("Sbar") while _G.Stamina > 0 and wait(0.1) do print("test") SBar:TweenSize(UDim2.new(0,_G.Stamina/100,0,1),'Out','Quint', 0.1, true) end