17:59:03.473 - SetSubject is not a valid member of ReplicatedStorage "ReplicatedStorage"
My script is
local SetSubject = game.ReplicatedStorage.SetSubject
function onEvent_SetSubject(Humanoid)
workspace.CurrentCamera.CameraSubject = Humanoid
end
SetSubject.OnClientEvent:Connect(SetSubject)
local SetSubject = game.ReplicatedStorage:WaitForChild("SetSubject")
function SetSubject(Humanoid)
I don’t know why your function starts with ‘onEvent’, as it’s not required and isn’t a function. Also, waiting for your variable instead of just referencing it ensures that if other scripts fire your event before you’ve referenced it, it’s not going to return an error.
Use a :WaitForChild(), it might not be in ReplicatedStorage yet, if that does not work, are there any other scripts interfering with this? Is there a script that is moving and/or deleting?