If I Set These Variables To Nil Will This Prevent Exploits

So I Am Making A Effort To Stop Exploits And I Don’t Know If Something Like This Will Work

getfenv().getrawmetatable = nil
getfenv().getreg = nil
getfenv().getloadedmodules = nil
-- And So On For All The Exploit Functions

Since It Gets The Global Environment. So How Should I Prevent The Functions From Being Used?

1 Like

No, it will not work. Exploit’s have an environment separate from the Roblox script environment.

You can’t.

3 Likes

Not like that’d do anything useful in the first place because exploiters can void your attempts and use their own functions anyway. Forget even that, this is just going to edit the environment of your script, not what an exploiter is running, so this is pointless to do.

Think about server-side security if you’re keen on setting up anti-exploit. Don’t try client-side security, it’s not a very long term solution and is only enough to stop exploiters who don’t fully know what they’re doing (that is, how to bypass such checks).

1 Like

Hi I Am Back.

@vtaetwrjxvdpgwjqkfzw @colbert2677
Thank You For The Replies. I Want To Secure Everything I Can. I Heard Of Obfuscation But I Do Not Want To Do That Since I Actually Want To Be Able To Read The Script. And They Can Just Copy My Code Like That And It Will Work. So How Should I Go About Protecting My Client. Other Games Like Fortnite Have Very Few Cheats Made For Them Because Fortnite Has Good Client Security. So Why Can’t Roblox Have Good Security.

Roblox places are already as secure as they can be without compromising the functionality or performance of the engine. It’s that Roblox “doesn’t have good security”, they have teams and such dedicated to getting rid of vulnerabilities and engineering teams do what they can with security in mind as well.

Most exploits are born out of your own systems, so you should work on securing your own systems where possible. Exploitation ability will inherently exist in all systems so you just need to work to ensure that the exploits a client can confirm aren’t detrimental or damaging to gameplay.

Fortnite runs on an engine, Unreal Engine 4 specifically. The only comparison here is UE4 and the Roblox engine to Fortnite and a Roblox game; each engine has its own quirks and leeway that it can provide. You otherwise can’t compare the circumstances between Fortnite and a Roblox game because they aren’t going to be the same. Just because UE4 has less opportunities to exploit, doesn’t mean the Roblox engine will: this is the same for Fortnite and your Roblox games.

1 Like

Hey there,
I think I know how to help you out, there’s a similar post made like this. You could look at their code and maybe figure out a way to create it but for

getfenv()

here’s the link: How To Anti-FunctionHook