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

How do I make a part rotate to the players mouse target? [Not answered]

I'm making a gun and wanted the arms to move to the user's mouse location (Can use mouse.Hit or Mouse.Target) . Is there a way I can rotate the part to the target using the parts C0?

(I havent used Cframe in a while :/)

1 answer

✓ Accepted answer

You can use the CFrame constructor CFrame.new(V3, V3).

part.CFrame = CFrame.new(part.Position, mouse.Target.Position);

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