In order to make a stats system I've been told to use RemoteEvents, so that the game is less exploitable, but I just don't know what im doing wrong. My script:
game.Replicatedstorage.DamageIncreasedEvent.OnServerEvent:Connect(function(plr) plr.Stats.Damage = plr.Stats.Damage + 1 end)
But everytime I try it, I get an error... The script is inside ServerScriptService and plr.Stats.Damage is an IntValue. As always, thanks in advance!
You need to change the value, not the object itself.
plr.Stats.Damage.Value = plr.Stats.Damage.Value +1