FPS unlocker makes my viewmodel disappear upon minimizing the game

so i am pretty sure this bug is related with the new roblox updates, but i cant post in the bug reports category so ill post here.

so basically whenever i turn on an fps unlocker and minimize my game, the viewmodel just disappears. this could be a pretty big problem since a lot of roblox users use an fps unlocker, especially in shooter games like mine.

this only started happening recently after the new updates, and the viewmodel script doesnt give me any errors in the console. it doesnt seem to happen without an fps unlocker.

1 Like

That’s because of DeltaTime if you’re using RunService.RenderStepped.

possible. how would i fix it then?

1 Like

Can you show me the script? So I can help.

Do you have like recoil that animates the viewmodel. That may causing it.

local MovementSwayAmount = Vector3.new(GetBobbing(10, 1, 0.2), GetBobbing(5, 1, 0.2), GetBobbing(5, 1, 0.2))
	MovementSway.Velocity += ((MovementSwayAmount / 25) * DT * 90 * hrp.AssemblyLinearVelocity.Magnitude)*(DT/base)*(base/DT)

only thing that i can think of. dt is delta time, base is 1/60 and movementsway is a spring (im using a spring module)

I recommend you to use Springs instead of Velocity.

Here’s one you can use. There’s API in it.

local UserInputService = game:GetService("UserInputService")

local RunService = game:GetService("RunService")

RunService.RenderStepped:Connect(function(DeltaTime)
local MouseDelta = UserInputService:GetMouseDelta()

MovementSway.Target = Vector2.new((MouseDelta.Y / 100),  (MouseDelta.X / 100))

VMHumanoidRootPart.CFrame = Camera.CFrame * CFrame.new(0, -1.5, 0) * CFrame.Angles(MovementSway.Position.X, MovementSway.Position.Y, -MovementSway.Position.X)
end)

image
it is a spring

Try this. I’m sure it will work. It doesn’t use DeltaTime for it.