Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED]Trying to make a camera script, tried everything, but its not working. Any help?

Asked by 5 years ago
Edited 5 years ago

I'm practicing moving the camera around and its not working, i'm trying to move it around while also moving around with the playing. I'm trying to just change its position while also being able to be controlled by the players mouse and follow the character, heres what i got:

local UserInputService = game:GetService("UserInputService")

local cam = workspace.CurrentCamera


UserInputService.InputBegan:Connect(function(key)
    if key.KeyCode == Enum.KeyCode.Q then
        cam.CameraType = Enum.CameraType.Track
        cam.CFrame = cam.CFrame + Vector3.new(200,200,200)
    end 
end)



Any help is appreciated, i searched everywhere for help but i couldn't find any. I tried to use CFrame * CFrame and CFrame + Vector3, but none of them are working

0
change the CameraType to scriptable, not track theking48989987 2147 — 5y
0
I'm dumb, thanks :) KinqAustinn 293 — 5y

Answer this question