Help with smooth movement

I’m trying to make my own weapons system. But I’m having some difficulties.

How can I smooth this out?

I tried with TweenService, but it was a failed attempt, because the position of the arms was also animated and slow. I tried to separate the Position from the CFrame Rotation, but it was another failed attempt. (cus am not good with CFrame, learning)

Code;


rs.RenderStepped:Connect(function(dt)
	local mouseDelta = game.UserInputService:GetMouseDelta()
	local deltaX = mouseDelta.X
	local deltaY = mouseDelta.Y
	rpg.main.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(deltaY*dt,deltaY*dt, deltaX*dt)
	--ts:Create(rpg.main, TweenInfo.new(0.1), {CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(deltaY*dt,deltaY*dt, deltaX*dt)}):Play()
end)

1 Like

You should try looking up lerping. I don’t have too much experience in that but I do know that it could probably work.

1 Like

You are multiplying the delta by delta given you an inaccurate delta

Remove the ( *dt) part

rpg.main.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(deltaY, deltaY, deltaX)
1 Like