Im trying to make it so if the player click and hold's a button, it can turn their character depending on if they click and hold the left button or right.
I was thinking of doing something like this :
button = script.Parent
active = false
char = game.Players.LocalPlayer.Character
button.MouseButton1Down:Connet(function()
active = true
if active == true then
turn = char:GetChildren()
while true do
turn.CFrame.fromEulerAnglesXYZ(0, 0, 0) +Vector3.new(1, 1, 1)
end
end
end)
button.MouseButton1Up:Connect(function()
active = false
end)
Im not use to CFraming, so what i wrote may be a bunch of nonsense, but that's an idea i thought on how it would work, but it isn't.

2 comments
Wow this is amazing, thank's a lot for this. This will help a lot in my game :)
I recommend using IsMouseButtonPressed() instead of creating a bool value dedicated to detecting if the mousebutton is held.