How would I implement a cooldown in a gun without hackers being able to modify it?

Hello there.

I’m working on guns for a game I’m trying to recreate called “Noobs vs Zombies: Relish Reborn”. Anyway, I’m struggling on how I would add cooldowns to my guns without worrying hackers would be able to modify the cooldown so items like sniper rifles would be automatic and such.

I was thinking about using attributes since, if I recalled correctly, they won’t replicate in the server if they’re modified in the client. Would this be a good idea and how would I implement it?

2 Likes

It doesn’t matter if you just use a variable, a NumberValue, or attributes. All that matters is that you check and handle the cool down from a server script. Save the os.clock() each time they shoot, and ensure a greater time has elapsed than the cool down delay.

2 Likes

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