Stop mouse from moving

Hello, I’m making a aim assist and I want is so when you’re hovering over a player the mouse slows down. The only problem is it doesn’t seem to work. It prints fine, but the sensitivity doesn’t change.
Script:

RunService:BindToRenderStep("AimAssist", Enum.RenderPriority.Camera.Value, function()
	if mouse.Target then
		local target = mouse.Target.Parent

		if target:FindFirstChild("Humanoid") and character:FindFirstChild("Head") then
			UserInputService.MouseDeltaSensitivity = 0
		else
			UserInputService.MouseDeltaSensitivity = 1
		end
	else
		UserInputService.MouseDeltaSensitivity = 1
	end
	print(UserInputService.MouseDeltaSensitivity)
end)

Any help is appreciated,
Thanks.

1 Like
1 Like

So would there be any other way to slow down the mouse icon?

UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
UserInputService.MouseDeltaSensitivity = 1

In that Document, it creates a binoculars script which slows down the mouse go check it!

Only problem is I don’t want it to lock center. Is this the only possible way. Sorry and thanks.

This should help

I’m pretty sure that’s what I wrote…well thanks for the help anyway.

Might be a problem where it checks if its finding the humanoid or head
. Print something and try. Sorry I couldnt help

1 Like

Hey all good. I really do appreciate any help. So it prints 0 when it’s over a player and 1 when it’s not.

Also dont make it 0 do the .MouseDeltaSensitivity / 2

You know I might just be really dumb. Can you test it? I really cannot tell.

local originalSens = UserInputService.MouseDeltaSensitivity

--// Aim Assist Function
local function aimAssist()
	if enabled then
		RunService:BindToRenderStep("AimAssist", Enum.RenderPriority.Camera.Value, function()
			if mouse.Target then
				local target = mouse.Target.Parent

				if target:FindFirstChild("Humanoid") and character:FindFirstChild("Head") then
					UserInputService.MouseDeltaSensitivity = originalSens / 2
				else
					UserInputService.MouseDeltaSensitivity = originalSens
				end
			else
				UserInputService.MouseDeltaSensitivity = originalSens
			end
			print(UserInputService.MouseDeltaSensitivity)
		end)
	else
		RunService:UnbindFromRenderStep("AimAssist")
	end
end

Could you record the mouse movement when it does touch or whatever the player. because your print makes it seem it does work.

robloxapp-20230917-1243254.wmv (427.2 KB)
sorry for incorrect format.

Extremly sorry I cant help you with that im not sure why it doesnt work.

1 Like

Bump

So to update the post I want my mouse to be sort of “delayed.” Like when lerping.

Bumpppp :facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch::facepunch: