Camera is set to follow but is not following the player

I’ve made a script where a button goes from a camera back to the player. However when the player dies on this screen, the button that resets the camera back to normal will not work. I can’t seem to find a way to fix it. Even manually resetting the camera in workspace.


You can see in the camera tab the type is “follow” yet does not follow the player.

script of the button:

local currentcam = workspace.CurrentCamera
local start = game.ReplicatedStorage.GameStarted
local ended = game.ReplicatedStorage.GameEnded
local going = false
local playcam = workspace.CameraPart
local play = script.Parent.Play
local function onClick()
	currentcam.CameraType = Enum.CameraType.Follow
	script.Parent.Play.Visible = false
	script.Parent.Parent.LoadoutGui.ToggleLoadoutGui.Visible = false 
	script.Parent.Parent.LoadoutGui.Loadout.Visible = false
	script.Parent.TextLabel.Visible = false
	script.Parent.Red.Visible = true
	script.Parent.Blue.Visible = true
end

play.MouseButton1Click:Connect(onClick)

I believe with camera type Follow you also must set the Camera.CameraSubject

1 Like

Is this script a serverscript or not? Are there output errors?

Actually, to my other post. I checked my recent camera scripts, and haven’t actually performed this myself, and they work.

1 Like

The default camera type is usually cameratpye Custom, not Follow… just checking that Follow is what you are looking for? Because your screencapture shows that it indeed returned to Follow.

It should return to follow. The camera subject is automatically set to the players humanoid when set to follow mode

Its a local script. It works when you click the button when you spawn into the game. If you die on the screen the code wont fix the camera back to the player