How would I make it so a BodyGyro, placed into the Character's torso, is pointed toward where the player puts their mouse?
I am guessing it would be something like this...
You would have a localscript inside the player that has the code:
local Player = game.Players.LocalPlayer local mouse = Player:GetMouse() local Gyro = script.Parent:FindFirstChild("Torso"):FindFirstChild("BodyGyro") local CanTurn = true -- A bool value that will be determined that will determine if the character is allowed to turn at this moment in time. Gyro.Torque = Vector3.new(10000000,10000000,10000000) if Gyro == true then while CanTurn == true do Gyro.cframe = Cframe.new(0,mouse.X,0) end end
This is meant to where the player turns their mouse, their character will turn, but they cannot turn upward, so that the fall over.
Will this work?