Hey,
So pretty much I am having a problem with the direction of the camera after my players does a rolling animation. The camera will move back to the spot it started in before the animation. I want the camera to be in the middle of the screen at the end of the animation.
robloxapp-20230703-1744571.wmv (903.8 KB)
rollAnimTrack:Play()
script.Roll:Play()
plr.Character:SetAttribute("Rolling",true)
print("Rolling")
wait(0.8)
campos = game.Workspace.CurrentCamera.CFrame
print("Hi")
rollAnimTrack.Ended:Once(function()
print(workspace.CurrentCamera.CFrame)
plr.Character:SetAttribute("Rolling",false)
print("Rolling stopped")
print(workspace.CurrentCamera.CFrame)
local prevCam = workspace.CurrentCamera.CameraType
workspace.CurrentCamera.CameraType = Enum.CameraType.Fixed
wait()
game.Workspace.CurrentCamera.CFrame.LookVector = CFrame.new(plr.Character.HumanoidRootPart.CFrame.LookVector.X, 0, plr.Character.HumanoidRootPart.CFrame.LookVector.Z) ---- having problem here
wait()
Comes up with error that says look vector cannot be assigned.
Any help will be appreciated