Script:
local replicatedStorage = game:GetService("ReplicatedStorage")
local isTeam = replicatedStorage:WaitForChild("IsTeam")
local bulletsModule = require(script:WaitForChild("BulletsModule"))
isTeam.OnServerEvent:Connect(function(plr, gunPosition, mousePosition, clientAmmo)
local char = plr.Character
local Ammo = char:WaitForChild("Gun"):WaitForChild("Ammo")
bulletsModule[plr, clientAmmo]
print(clientAmmo)
end)
Module Script
local bulletsModule = {}
return bulletsModule
Explaination:
I am trying to keep track of the amount of ammo each player has so when an exploiter changes their ammo value locally the server would know and punish them I guess, with the belt.