Hey! so I’m working on a gun system and to make the movement feel smooth. I’m trying to make the camera slightly rotate left or right dependent on which way the player is walking.
I found some code on a different post which worked but it wasn’t tweened or tweenable the way it was set up. I tried to make it to where it would work but nothing happens when I move.
anyone know a solution?
I’m not getting any errors in the output either at least when I looked a few times
all other things involving the camera are working fine in the local script
UserInputServ.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.KeyCode.A then
local x,y,z = camera.CFrame:ToEulerAnglesXYZ()
TS:Create(camera, TweenInfo.new(.75), {CFrame = CFrame.new(camera.CFrame.Position) * CFrame.Angles(x,y,z) * CFrame.Angles(0,0,math.rad(1.5))}):Play()
end
I tried reconstructing your code to show the different processes that are happening in this tween. I have this in a LocalScript and it seems to be running, although it does make the camera stationary while tweening:
UserInputServ = game:GetService(“UserInputService”)
camera = workspace.CurrentCamera