How can i create an attribute that cant be changed by a player

i have a system in my game where it checks for every item in the cart and then put it in the attribute called “Total” but the problem an exploiter can change that “Total” attribute to 0 and then get the items for free

i wanted to say “how can i create an attribute that cant be changed locally” but the problem i want to change it locally via a local script but i don’t want an exploiter to change it and Simply get the items for free

i don’t think i need to show any scripts because all i need is a sort of invisible attribute
((I know i can make a value inside a local script but i cant send it to other scripts effectively))

1 Like

the only effective way to secure your “Total” attribute would be changing it or checking it on the server.

if your items have set prices on the server, you could just add the total on the server and compare what the client sent back to see if it’s the same.

Set the attribute on the server, and check it on the server.

For example, if you were to store cash with a system like this, even if a client hack tried to set the cash value, it won’t update to the server so it won’t affect datastoring in any way.

1 Like