local ammo = script.Parent.Ammo.Value local ammoGui = game.StarterGui.GunGui.BackgroundFrame.AmmoDisplay local function onUpdateAmmoDisplay() while wait() do ammoGui.Text = ammo.."/"..maxAmmo end end spawn(onUpdateAmmoDisplay)
you are modifying the StarterGui
, everything thats inside the startergui gets cloned into the PlayerGui
of a player so if you modify something in StarterGui
it will only show after the players dies so if you want the modify it instantly you have to modify the PlayerGui
the PlayerGui
is part of the player. like this Player.PlayerGui