How to stop higher fps from shooting faster than normal

Theres a problem in my gun shooting system where people with fps unlocker shoot way faster than others which makes it super unfair is there a way to fix that?

The shooting deley system is located client sided
Using

for i = 1,Fireratex10 do
Heartbeat:Wait()
end
local before = os.clock()
for i=1,Fireratex10 do
  Heartbeat:Wait()
  doDamage(i * (os.clock() - before)
  before = os.clock())
end

The deley system is a wait system
And woudnt that do damage while waiting for shoot

You should do stuff while taking delta time into account.
Ideally using while loops instead of for loops.

1 Like

yes, i know that. Just cause I use os.clock() doesnt mean i am saying to use a custom wait im saying you can get the delta time from that and use that as a basis such that they normalize for all refresh rates like what @Feedekaiser suggested

1 Like