Mouse.hit problem

How can i make it not changing orientation?

local players = game.Players.LocalPlayer
local mouse = players:GetMouse()

mouse.Move:Connect(function()
	mouse.TargetFilter = game.Workspace.BigPart
	game.Workspace.BigPart.CFrame = mouse.Hit
end)
2 Likes

Yeah, before changing the CFrame, store the part’s orientation in a variable. After changing the CFrame, apply the part’s orientation to the variable stored earlier.

You should use documentary, it’ll help out with things like these: Mouse | Documentation - Roblox Creator Hub
Mouse | Documentation - Roblox Creator Hub

Now, Onto a solution, alll you need to do is change your game.Workspace.BigPart.CFrame = mouse.Hit to game.Workspace.BigPart.CFrame = CFrame.new(mouse.Hit.p)

3 Likes