I was making the FPS system which if player dies, their weapon and ammo stats will be reset. However, when I test it in a server, it does not only reset the ammo of the respawned player, but all the whole players in a current server
Here is my video: robloxapp-20220815-1207279.wmv (1.8 MB)
When a random player dies, upon respawn, ammo stats of all the players are reset, as you can see in the bottom right corner, but the old stats remains unchanged in the next shoot.
How can I fix this?
Due to the fact that you are updating the ammo from the server, everyone gets updated. You put a server-side script in every player’s GUI that updates the ammo whenever an event is fired. Since everyone has the script and it is server-side, everyone is updated. Using this method is completely pointless because you can just update the ammo right from the client script!
You can easily solve the issue by disabling the ammo frame’s server-side script and either making a module that updates the ammo UI or just inserting the function into the “Framework” client script.
You can download this file now that it has been fixed.
I would appreciate it if you could give this reply a solved check.