There’s a localscript inside the oxygen screengui that adjusts the size:
local player = game.Players.LocalPlayer
local Hum = player.Character:WaitForChild("Humanoid")
local background = script.Parent
local Bar = background:WaitForChild("Bar")
local OxygenText = background:WaitForChild("OxygenText")
OxygenText.Size = UDim2.new(1,0,1,0)
local oxyValue = player:WaitForChild("OxygenValue")
while wait(0.3) do
Bar:TweenSize(UDim2.new(player.OxygenValue.Value/1000,0,1,0), "Out", "Quad", 0.3)
OxygenText.Text = player.OxygenValue.Value.."/1000"
if OxygenText.Text == "0/1000" then
Hum.Health = 0
end
end
Yeah like SOTR said, check the parent of that bar… what probably is happening is that the parent of it is a ScreenGui object, so when you do the line of code:
OxygenText.Size = UDim2.new(1,0,1,0)
You’re basically telling it to hav an X and Y scale of 1. So, it will be the same size of whatever parent it is. I’m guessing the parent is the ScreenGui because that has the size of the screen.
I recommend to fix this, using a dummy frame, that will be the size of the bar when it’s at its max length, and that frame will be the parent of the actual oxygen bar.
i actually fixed it myself i had the bar set up wrong and everything was parented to the screengui but the background should have had everything else in it so i fixed it like this: