It doesn't change the size of the gui as expected
local HealthOverlay = script.Parent.Health:WaitForChild("Overlay") local xscale = 0 local xOffset = 250 local yscale = 0 local yOffset = 23 HealthOverlay.Size = UDim2.new({xscale,xOffset},{yscale,yOffset})
You're trying to call the UDim2.new function with two table arguments when it expects four number arguments. Remove the curled brackets and the script will run without error.
local HealthOverlay = script.Parent.Health:WaitForChild("Overlay") local xscale = 0 local xOffset = 250 local yscale = 0 local yOffset = 23 HealthOverlay.Size = UDim2.new(xscale,xOffset, yscale,yOffset) -- this function does NOT use two tables as arguments, it instead uses four numbers.