Hello, so i am making a script then rotates the player to the target. This is my current script:

function KeyD(key)
	if key:lower() == "e" then
	char.Head.Orientation = Vector3.new(mouse.Target)
end

game.Players.LocalPlayer:GetMouse().KeyDown:connect(KeyD)

I want to script it so the player's character rotates to the target the mouse is pointing at. But everytime i rotate a bodypart, the player dies. And everytime i try to rotate the HumanoidRootPart, the character just loses control.

The rig is R15. Any help is appreciated, thanks!

2 comments

0

Are you ONLY supporting R15 or both R6 and R15.

0

Only R15