How would I make sure that the camera attaches to the player?

Yep, I assume that would fix the problem.

Alright so I tried that and things lead to another and I made another script, heres that script:

local Camera = workspace.CurrentCamera
script.Parent.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer.Name
	local player = game.Workspace:FindFirstChild(plr)
	Camera.CameraSubject = player.Humanoid
	
end)

I made a bigger problem, because that’s what I do. But now it made an output error:

ActivateCameraController did not select a module.

That came from the camera module, btw

Oh yea forgot the wait() before the gui changing didn’t work, sorry about that

local Camera = workspace.CurrentCamera
script.Parent.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer.Name
	local player = game.Workspace:FindFirstChild(plr)
	Camera.CameraSubject = player.Humanoid
end)

This code has a few problems. First of all, when you’ve referenced plr, you’ve referenced the name. Second of all, you are not referencing the character at all.

Here’s your improved code:

local Camera = workspace.CurrentCamera
script.Parent.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer
local character = plr.Character or plr.Character:Wait()
	Camera.CameraSubject = character.Humanoid
end)
1 Like

thank you, I tired to put this in a seperate script so thats why I was a bit late to accept it.
heres a dog picture I found on the internet