Camera help probably NOW!

no, i just forgot but its fixed now

Have you changed the CameraSubject anywhere else? Also is this in a Local or Server script?

and no the local script is not named camera

i have one other script and it does nothing to the camera

Alright then, are they both LocalScripts? & are you getting the CurrentCamera instead of the actual Camera?

heres the whole script

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local UIS = game:GetService("UserInputService")
local thing = true
UIS.InputBegan:connect(function(input)
	if Enum.KeyCode.Q == input.KeyCode and thing == true then
		print(thing)
		camera.CameraType = Enum.CameraType.Fixed
		camera.CFrame = CFrame.new(workspace.camera.CFrame.Position,workspace.camera.CFrame.lookVector)
		thing = false
	elseif thing == false then
		print(thing)
		thing = true
		camera.CameraType = Enum.CameraType.Custom	
	end
end)

yes i am getting the current camera

Don’t know why you’re setting the CameraSubject to the Humanoid if it’s already set by default

Only thing I see is that you could try setting the CameraType to Scriptable if that changes anything?

1 Like

on line 11 you need to do workspace.CurrentCamera.CFrame.Position instead of workspace.Camera.Position

Did you see post #8?

2 Likes

but this a local script and i only want to change the cam for only one player

it’s not possible to just do workspace.CurrentCamera.Position you need to get the position from the cframe

since when did i have to do this

i don’t get what you’re saying sorry but all i’m saying is if you want to get the vector3 position of the camera then you have to do workspace.CurrentCamera.CFrame.Position

why cant i just do

workspace.CurrentCamera.Position

it’s because position isn’t a property of the current camera

If you look at the wiki, you will see that Position is in fact not a property of camera.

my brain is more hot then my computer WHAT!? never knew changed it still not work

Put this in a localscript inside starterplayerscripts under the starterplayer tab in the explorer.

or something like this:

--inside a local script in StarterPlayerScripts
local camera = workspace.CurrentCamera --defines the camera in the workspace.
camera.CameraType = Enum.CameraType.Scriptable --sets type to scriptable.

--CFrame code goes here

wait(3) --waits 3 seconds before changing back

camera.CameraType = Enum.CameraType.Custom --Back to player.