Let’s say a player gives themself some cash using hacks. Would a LocalScript be able to see that?
A local Script can be accessed by the Server and Client, So if someone uses some sort of exploit, i don’t know what, but i won’t recommend u trying it out. It can view the Workspace and everything that will be handled on the client, like StarterGui etc.
I would advice u to double check it on the server.
You could detect them giving cash via (client) exploits, but they would be able to delete those LocalScripts
.
If you are trying to do cheat detection you cannot use Local Scripts. You need to be defensively coding. Hackers can only give themselves cash if you let them, if you have a cash-giving remote event, validate that the player is using it properly. Touched events can be exploited too.
Yes, a LocalScript could detect modifications made to the client through the use of exploits. However, as they are on the client, the exploiter can just delete the LocalScript.
Yes, a localscript could view that. However, like other people are saying, since localscripts are ran on the client and exploiters can tamper with anything on their client, the localscripts can be deleted. It is best to just add checks on the server to make sure that the player is gaining money legitimately, and what legitimate means in context to your game will most likely be different to other peoples’ games.
Why would it matter? You’re not using number detections and comparisons in client are you?
As everyone has already said here, yes you could Hypothetically use a local script to detect modifications, however other issues arise as it is on the client. The only, only time I recommend you use client scripts for anti-cheat system is if there is a ton of client to server communication, and that it would be irresponsible to not try. Or, if you try to make one, you know the risks of it being removed and develop some work arounds, around that
It heavily depends of the “hack” that’s being used.
The LocalScript is able to notice changes of cash from either the client or server, including if the player gets “infinite” cash via illegitimate means
However, nothing gets changed from the server side since the client is not allowed to send changes from client to server, so it’s only suggested to make sanity checks from the server side.
If the server is also receiving changes for infinite cash, then it’s likely that your game has a Backdoor script or has a vulnerability with the remotes.
Even if they do give themselves some cash, the change would be only on the client. Server will not be affected, so it’s their problem if they do so.