Ok so I have a script which essentially runs an inventory gui so the player can see all of the items they have. I have an issue however: An exploiter can just change these values. I know that less then 1% of the roblox community uses exploits but I still want to be on the safe side especially as people might leave the game as other people might hack. So this is mylocal script right now and how can I have a server side check to make sure these values are equal as the server cannot access this gui because it is being cloned.
This is the script:
local player = game.Players.LocalPlayer local inventory = player.Inventory player.Inventory.ChildAdded:Connect(function(addedweapon) for _,child in pairs(inventory:GetChildren()) do local weaponframe = script.Parent.Parent.Frame:Clone() weaponframe.Parent = script.Parent weaponframe.Visible = true weaponframe.WeaponName.Value = addedweapon.Name weaponframe.Damage.Value = addedweapon.Damage.Value weaponframe.CritChance.Value = addedweapon.CritChance.Value weaponframe.Health.Value = addedweapon.Health.Value weaponframe.HitRate.Value = addedweapon.HitRate.Value end inventory.ChildAdded:Connect(function(child) end) inventory.ChildRemoved:Connect(function(child) end) end)
It shouldn't matter as you normally wouldn't fire the dmg from the local script. It should just be a visual exploit that will only show to the exploiter and it also wont change in the data as long as theres no remote being fired with those stats. When you are damaging, take the damage from a module (something like require(game.ReplicatedStorage.Modules.WeaponStats)[addedweapon].Damage
). You should never fire a remote with the amount of damage and hit rate, etc. there are more exploiters than you think.