I wanted to make it so when you press 'Shift' it makes your Character face the Position of the Mouse... However, it won't do that and I have no clue as to why it won't work correctly... This script is a LocalScript inside of StarterGui....
ocal player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local bg = Instance.new("BodyGyro")
bg.maxTorque = Vector3.new(400000000, 400000000, 400000000)
bg.D = 200
bg.P = 3050
mouse.KeyDown:connect(function(key)
if string.byte(key) == 48 then
local torso = player.Character.Torso
bg.Parent = torso
debounce = true
while debounce == true do
bg.CFrame = CFrame.new(mouse.hit.p)
print(bg.CFrame)
wait()
end
end
end)
mouse.KeyUp:connect(function()
debounce = false
bg:remove()
end)
Thank you for reading the whole question and I hope someone can help me out!

5 comments
Isn't like like shift lock?
well similar
Yeah, I turned my shift lock off to see if it works.
Please use UserInputService and test. KeyDown is deprecated and should not be used for future projects.
I haven't learned how to use "UserInputService" yet.... Plus what's wrong with KeyDown?