So im trying to make a part follow the mouse of the player but when i do not move my mouse constantly it goes on itselfe and this repeats until it hits my cam
thats the code i used how can i change that
wait(2)
local Player = game:GetService("Players").LocalPlayer
local Part = game.ReplicatedStorage.Part
local mouse = Player:GetMouse()
while wait() do
local Loc = mouse.Hit
print(Loc)
Part.Parent = workspace
Part.CFrame = Loc+Vector3.new(0,.5,0)
Part.Orientation = Vector3.new(0,0,0)
end

1 comment
In the case that you want multiple things ignored, TargetFilted isn't going to do it for ya, if you need this, use a raycast from the camera position, use the Unit from the Mouse.UnitRay, and FindPartsOnRayWithIgnoreList