local function OnRenderStep(Input)
Camera.CFrame = Camera.CFrame * CFrame.Angles(0, 0, if Input == "Q" then math.pi / 20 elseif Input == "E" then -math.pi / 20 else 0) + Vector3.new(if Input=="Q" then math.pi/2 elseif Input=="E" then math.pi/2 else 0,0,0)
end
I have here a part of my code for the tilting script. But the vector 3 moves my character and camera but I just want it to move my camera (In this case my character goes backwards when i press either q or e because of the vector 3). How can i do this? Sorry if am bad at explaining but I am sure you guys can understand. Thanks
Please explain what is meant to happen. It looks like the camera is meant to roll when the player inputs to roll left or right, but why add the Vector3?
Well, It is a peek system. Kind of like PUBG peek system. I used Vector3 because that’s the only function I know to move the camera without the character also moving when in first person. But I have found a way by using the CameraOffset inside Humanoid
local function OnRenderStep(Input)
Camera.CFrame = Camera.CFrame * CFrame.Angles(0, 0, if Input == "Q" then math.pi / 20 elseif Input == "E" then -math.pi / 20 else 0)
Humanoid.CameraOffset = Vector3.new(if Input == "Q" then math.pi/ -2 elseif Input == "E" then math.pi/ 2 else 0,0,0)
end