CameraMin/MaxZoomDistance not working

So the Min and Max zoom distances initially work when the char is added but once the event is triggered they do nothing, i tried switching the positions to after the camerasubject change too but that didn’t work… I’m clueless
THE CRAZY THING IS THAT I CAN EVEN MANUALLY CHANGE IT WITH NO PROBLEM?
for some reason it just decides NOT to change the vals…

local cam = game.Workspace.CurrentCamera
local plr = game.Players.LocalPlayer
game.ReplicatedStorage:WaitForChild("KilledBy").OnClientEvent:Connect(function(plr)
	wait(1.5)
	plr.CameraMinZoomDistance = 15
	plr.CameraMaxZoomDistance = 15
	wait(1)
	--cam.CameraType = Enum.CameraType.Scriptable
	cam.CameraSubject = plr.Character.HumanoidRootPart
	script.Parent.TextLabel.Text = "Killed by: "..plr.Name
	script.Parent.Enabled = true
end)

game.Players.LocalPlayer.CharacterAdded:Connect(function(char)
	cam.CameraType = Enum.CameraType.Custom
	cam.CameraSubject = char:WaitForChild("Humanoid")
	plr.CameraMaxZoomDistance = 35
	plr.CameraMinZoomDistance = 0
end)
1 Like
OnClientEvent:Connect(function(plr)

Remove ‘plr’ here.
It’s overriding the original declaration for ‘plr’ with nil.

2 Likes

i switched up the declarations last time i tried this fix… so i thought that wasn’t it. thank u tho