NumberValue not changing in Explorer

I’m making a gun script.
I have a MaxAmmo Value and a CurrentAmmo NumberValue to keep track of the player’s munitions.

In a server script, each time the player fires a bullet, it will minus 1 from CurrentAmmo. This actually works, but the CurrentAmmo value inside the explorer isn’t changing, but inside the script it does.

I have no clue whats going on, it’s like the script is using it’s own independent value.

Can you show me the full script, please?
Because I’d like to see Where’s The Issue At.

The rest of the script isn’t relevant to my issue. The issue is this value isn’t changing. The code that I showed is the only part in the script where I change this value.

then it means you didnt use the shoot function?

No, not the Value, I want the script.

The function is being called fine, it’s just the value doesn’t wanna change for some reason.

Did you go into the player in workspace to see that or did you go into StarterPack in your tool, because you need to see the value change to go in the character in the workspace in game !
Have a nice day !


Oh my god, thank you. Yeah I went into StarterPack instead of looking at the character in workspace. That drove me insane.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.