Model following mouse is slanted vid+code

The model following my mouse is slanted and when I dont move my mouse it kinda dissapears
vid + code
local script

local Placing = game.ReplicatedStorage.Placeables.landmine

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



script.Parent.Equipped:Connect(function()
	local Place = Placing:Clone()
	Place.Parent = workspace
	local main = Place.Main
	mouse.Move:Connect(function()
		main:PivotTo(mouse.Hit)  
	end)
	script.Parent.Unequipped:Connect(function()
		Place:Destroy()
	end)
end)

It’s slanting because mouse.Hit is a CFrame value, meaning it has an orientation as well as position, so it is rotating relative to the camera. If you want it to not rotate you can change it to this:

main:PivotTo(CFrame.new(mouse.Hit.p))

This creates a new CFrame with the same position as the original, but without the orientation.

As for why it disappears when you stop moving, make sure it is anchored.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.