I want to turn a player through a script. I've tried setting the rotation for Torso, but that kills the player, and HumanoidRootPart, which does a weird effect that raises the part and detaches it from the player.
I've tried CFrame.Angles, but I can't seem to get the right amount that won't make the player spaz out.
I'm using this so I can let the players move their mouse to move their character, but it just doesn't seem to work.
How can I do this?
There's a nifty little add-on to the original CFrame operator that's created like this:
local point, lookvector = Vector3.new(), Vector3.new() local cframe = CFrame.new(point, lookvector)
Basically, the first value works like setting the position of the torso, and the second value is where the CFrame points.
local mouse = game.Players.LocalPlayer:GetMouse() repeat wait() until game.Players.LocalPlayer.Character game:GetService("RunService").RenderStepped:connect(function() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Torso.CFrame.p, mouse.Hit.p) end)
Hopefully this works, if you have any other questions, you can consult me through my ROBLOX account. Sorry if some wording is bad, English is not my first language. Thanks!