U shouldn’t have a remote event that litteraly gives u Coins.
Exploiters can do CoinRE:FireServer(math.huge)
to get infinite Coins.
The code will also be shorter if u used Compound Assignement Operators
player.leaderstats.Points.Value += 1
U shouldn’t have a remote event that litteraly gives u Coins.
Exploiters can do CoinRE:FireServer(math.huge)
to get infinite Coins.
The code will also be shorter if u used Compound Assignement Operators
player.leaderstats.Points.Value += 1
and what should I do? Because I thought that he remote events was a save method
Either add Magnitude Checks or handle the touched events Server-Side
I dont kno about that, how can I do it?
I’m going to investigate a bit while waiting your awnser
U would check if the Magnitude between the coin and the Player’s HumanoidRootPart is lower than a certain amount and then give the coin.
But I want that everyone can have the coin. It doesn’t matter the conditions.
But u don’t want exploiters do u?
No I dont want them, so you say that only people under a certein amount can have the coin?
I said, u gotta get the magnitude between the Coin and HumanoidRootPart, and if thats under a certain amount then give the coin.
And how can I do that because I have never heard about that
U would do (Coin.Position - player.Character.HumanoidRootPart.Position).Magnitude
. Also be sure to add checks to see if the Character exists to avoid errors.
So I put that on the leaderstats script(send it to the server)
U would put that on the Server Script. This would add a layer of security to the game (Server Side Validation).
but somewhere in particular, because if I just leave it like this it will give me an error
You would have to define Coin.