I've got an AK47 scripted with a LocalScript and I tried to change NumberValues of MaxAmmo, Ammo from in-script values, to in-tool values, it works fine with Play Solo in Studio, but when I join game from Roblox page it doesn't work and in F9 (idk what its name is) it says MaxAmmo is not a part of Tool. Help!
COMMUNITY QUESTION
Gun doesn't work in a server, while it works in studio, why?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Add to the script (Tool:WaitForChild("MaxAmmo")). When the player joins, the script is loaded and runs it. But the part's arent. So just add an WaitForChild() , that should fix it.
Also try reading up on this article: https://scriptinghelpers.org/blog/it-works-in-studio-but-not-online