Recoil being affected by high FPS

No, that’s the issue, I’m trying to find a solid fix to this FPS issue

What is the speed and iterations?

Character minimum blablkablabala

1 Like

iterations is 8
speed is 4

characteraaaaaa

1 Like

Try using the tick variable and check it for 60 fps.

This locks it to 60 fps,
Change “fps” to any given fps

Ex:

local fps = 60
local fpsDelay = 1/fps
local fpsTick = tick()

RunService.RenderStepped:Connect(function(dt)
       if tick() >= fpsTick+fpsDelay then
              fpsTick = tick()
              --Run recoil code
       end

       --Other stuff
end)
1 Like

you could try math.clamp to limit the max values that can be used for the recoil

1 Like

Dear Game Developers, Stop Messing This Up!

2 Likes

I dont understand, what if someone has an fps higher than 60?

1 Like

Where would i implement that though?

1 Like

It’s locked to 60 fps no matter what.

1 Like

that’s assuming the physics step is called 60 times a second wich could not always be the case

1 Like

check what values are being exponentially increased when you go over 60 fps and clamp them, that should prevent it from going above and below the value u have set, like a upper and lower limit for the returned value

1 Like

There is an app called RobloxFPSunlocker and it does unlock

1 Like

This does not compensate for time errors so it’s not very accurate either.

1 Like

Hmm, that could work, let me give it a try

2 Likes

This should give me a fix? It’s a long video though.

just use RunService.HeartBeat instead of RunService.RenderStepped

What difference will it make? I already tried it but it doesn’t seem to work

1 Like

Actually, after messing around, it does seem to work, but there’s another issue, hopefully a smaller one.

It’s just when i set the viewmodels cframe to the cameras cframe, it kinda glitches and creates this weird effect,

Have any idea on how to fix it?

which Weird Effect, could you send a video of that please so i could understand the problem?

It’s been solved anyway, managed to work it out somehow.