I am working on a UI for my gun engine, and came across a huge issue. Whenever I print the ammo value, it is perfectly normal. Whenever I set the textlabel text to it, it is completely wrong.
Video (watch the output and the label) (LOUD SOUNDS!):
Code:
game:GetService("RunService").RenderStepped:Connect(function()
local ammo = _G.Ammo
if ammo then
script.Parent.Text = ammo
print(ammo)
else
script.Parent.Text = ""
end
end)
I have tried reading straight from the actual ammo value, but the same issue happens.
Never had this issue before.