Imagine a tool cost 300 points. You collect 300 points(from the collictable coins) and buy it. Everything goes as it should be but when you pick up another collectible coin(after buying the object) instead of changing from 0 points to 1 points it changes from 0 to 301 again
Ah, if it isn’t that typo, then I would check to save the coin data after buying the tool.
I’m talking about the error in the output, you said there was an error.
Yes but I solved it and the error stills there
But can you show us the error in the output?
now there isn’t any error because lua thinks that everything is alright and is working as it should be but it isn’t
Im going to try to send everything to the server so that it can be modified the IntValue
Yeah, it looks like there’s an issue in your code that’s letting it turn into negative numbers, I have no idea how you’d solve that. Sorry.
I don’t know what the hell is happening but anything works
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