Hello, I’m making a vertical gui that shows how much ammo the player has left. I know how to make it work horizontally but I don’t know how to make it vertical. I’ve tried swapping around the values in the x and y but it doesn’t seem to work. The script below works for a horizontal bar. Btw I am using a billboard gui with a frame inside of it. I want the billboard gui to be beside the player vertically.
local frame = script.Parent
local billboardGui = frame.Parent
local char = script.Parent.Parent.Parent
local gItem = nil
repeat
local item = char:FindFirstChildWhichIsA("Tool")
task.wait()
if item then
gItem = item
print("end")
end
until item
task.wait()
local currentAmmo = gItem:FindFirstChild("CurrentAmmo")
local maxAmmo = gItem:GetAttribute("ammo")
currentAmmo.GetPropertyChangedSignal(currentAmmo, "Value"):Connect(function()
print("Changed")
if char.Humanoid.Health <= 1 then
script.Parent.Parent.Enabled = false
else
script.Parent.Parent.Enabled = true
end
frame:TweenSize(UDim2.new(currentAmmo.Value/maxAmmo, 0, frame.Size.X.Scale, 0))
end)