Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

object rotating when following mouse?

when having an object follow the mouse it's orientation is switching to 0,0,0 when it should be at -90,90,0

here is the code im using Local mouse = Player:GetMouse()

		mouse.TargetFilter = game.Workspace.HAND_TRACER

		while wait() do
			game.Workspace.HAND_TRACER.CFrame = CFrame.new(mouse.Hit.p)

1 answer

✓ Accepted answer

Use this:

mouse.TargetFilter = game.Workspace.HAND_TRACER

while wait() do
    game.Workspace.HAND_TRACER.Position = mouse.Hit.p
    game.Workspace.HAND_TRACER.Orientation = Vector3.new(-90, 90, 0)

This discussion is preserved as it was. New answers, comments, and votes are closed.