Player go slow when facing a part with tool

so i have a tool equipped, and i have a thing that make player face the mouse, the problem is, when i face the part with a tool, it makes me slow, then fast like theres an invisible block or something, the movement is very random, heres the script:

local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()

repeat wait() until Player.Character; local Character = Player.Character

game:GetService("RunService").RenderStepped:connect(function()
	Character:WaitForChild("Torso").CFrame = CFrame.new(Character.Torso.CFrame.p, Vector3.new(Mouse.Hit.X, Character.Torso.CFrame.p.Y, Mouse.Hit.Z))
end)
2 Likes

Is cancollide turned off in the part?

1 Like

no, but i don’t thinks its the problem because it works fine when i look at it without tools

and i walk very funny with tools on, its like something is pushing me, I tried it without my top down camera script and no glitch is there

Is cancollide off of every part in the tool?

yeah, heres what it looks like with a wall:


notice my character isn’t facing my mouse

Use Mouse.TargetFilter

local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
Mouse.TargetFilter = workspace

repeat wait() until Player.Character; local Character = Player.Character

game:GetService("RunService").RenderStepped:connect(function()
	Character:WaitForChild("Torso").CFrame = CFrame.new(Character.Torso.CFrame.p, Vector3.new(Mouse.Hit.X, Character.Torso.CFrame.p.Y, Mouse.Hit.Z))
end)
1 Like

huh now it looks like this:

the tool slowness stopped but the character isn’t facing the mouse anymore

For the targetfilter set it to whatever blocks you want it to ignore, I think the reason why it’s moving like that is because when you filter the workspace it filters all its descendants including the baseplate.

well i think its because of the camera angle or something?