Camera Subject can't be set

Hey!

So, I’m trying to make a script that makes the camera follow a ball. Thing is, I can’t set the CameraSubject to be the ball for some reason, it defaults to Humanoid even though I change it in a LocalScript.

ReplicatedStorage.PlayerSpawn.BallSpawned.OnClientEvent:Connect(function(plrBall)
    plrCam.CameraType = Enum.CameraType.Follow
    plrCam.CameraSubject = plrBall
end)

I added a print to make sure the plrBall argument was valid and it was. If I don’t set the CameraType, it defaults to ‘Attach’ and doesn’t follow the ball.

Any help is appreciated! Thanks :slight_smile:

I think that all CameraTypes (except Scriptable) are following the humanoid.
I suggest using CFrame:Lerp() (And also set your camera to Enum.CameraType.Scriptable

1 Like

i suggest you to make
plrCam.Focus = CFrame.New(plrBall.Position)

That will change only once, unless you loop it, but I am sure he doesn’t want to have rough camera interpolation

1 Like

I made a script like this,its called Autocam and it also follow a ball
maybe u should create a part,put the subject at the part and make the part follow the ball with CFrame stuff

1 Like

the CameraType is scriptable**

Alright, I’ll have a look, thanks :slight_smile: