Detecting when a metatable is changed

So, I’m making a client-sided anticheat. Yes, I already have a server-sided one, yes, I know that exploiters have more power over the client, yes, I know I need to focus more on the server, which I have, etc, etc. But, I’m not here to waffle about why I’m making a client-sided one.

I thought about sandboxing the script in it’s own table-metatable pair. But, if exploiters get that table, they could just overwrite the metatable, so I need to detect that. But, they can use the __metatable metamethod to trick my script so when it compares the metatables, they appear the same but they are different.

I am currently stuck on a way to get around this. I guess, I’m just asking how to replicate the getrawmetatable function that a lot of exploits use, so I can use it in my anticheat.

If anyone has any ideas on how I could do this, please let me know.

1 Like

nevermind i found a solution where i stop the metatable from being changed in the first place (I won’t say it here because I don’t want to give away my security tactics).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.