Right now I’m using task.wait() but the wait seems to be different depending on the players frames. What can I do to yield a script for the same time no matter the client performance? Any help is appreciated.
Set a specific time for it then? If this isn’t what you want, what do you want?
No my problem is im using task.wait() but if a player has like 20 fps then task.wait() is longer because wait() is dependent on client performance. I’m just wondering how to get around that issue.
Why would client performance be an issue since the timing is so miniscule? You can’t really go lower than what their PC will allow so unless you want more latency adding it yourself like the example above that is probably your best bet.
I’m making an FPS and my friend with a fps unlocker was shooting much faster.
Why is the gun locked to your FPS may I ask? Surely there should be a delay or is it supposed to be as fast as possible?
task.wait() in itself without a number will make the script wait for a single frame to then resume the next frame. As @zrax_rb said:
Set a specific time for it then
task.wait(Number) will make the client wait at least that many seconds before resuming on the next frame. That is what you should ideally do.
Its not locked to FPS, its locked to a wait() of the firerate but wait() is dependent on client performance/fps if that makes any sense.
Do the shot delay on the server. It means that everyone will have the same firing rate. Also means that exploiters cannot edit the value and shoot as fast as their computer will allow.
wait(1/60) ? Not sure if that will work
If you try task.wait() on the server that issue should not occur
That would result in consistent shooting but there are maybe better ways of doing it such as using TPS (Ticks Per Second) / Server FPS (Frames Per Second).