I am making a Top Down View Game and I am wondering how I make my player point their whole body towards their cursor.
COMMUNITY QUESTION
How do I make a Point towards cursor script?
1 answer
Start off by creating a loop. Inside of that loop, we'll start off by placing the playér mouse.Hit.p value inside of a new variable MP. Then, we set the CFrame of the character's humanoidrootpart to CFrame.new(HumanoidRootPart Position, MP)
The MP variable is the player's 3D mouse position, and the CFrame.new() creates a new CFrame using 2 Vector3 arguments: The first is the position of the CFrame, and the second is where it points towards.
This discussion is preserved as it was. New answers, comments, and votes are closed.
