I would like to make a button that increases the damage value for a player, but the one I made is just not safe enough. I tried it with remote events, but it didn't work. How could I make it safer and less exploitable?

script.Parent.MouseButton1Click:Connect(function()
game.Players.LocalPlayer.Stats.Damage = game.Players.LocalPlayer.Stats.Damage +1
end)

Everytime I used remote events, the output said, that userdata cannot be changed.

2 comments

0

You have to use remote events otherwise it won't change on the server. If it won't change on the server then It hasn't changed for any other people so all other people will not see the updated "Damage" value

0

But how do you do that