local debounce = false
script.Parent.OnServerEvent:Connect(function(plr)

	plr.Character.Humanoid.WalkSpeed = 0
	game.Players.LocalPlayer.CameraMaxZoomDistance = 13
	game.Players.LocalPlayer.CameraMinZoomDistance = 13
	local Spear = plr.Character.RightHand.Spear
	local spoor1 = plr.Character.RightHand.Spear.MeshPart1
	local spoor2 = plr.Character.RightHand.Spear.MeshPart2
	
	Spear.Transparency = 0.6
	spoor1.Transparency = 0.6
	spoor2.Transparency = 0.6
	wait(1)
	plr.Character.Humanoid.WalkSpeed = 20
	wait(10)
	plr.Character.Humanoid.WalkSpeed = 16
	Spear.Transparency = 1
	spoor1.Transparency = 1
	spoor2.Transparency = 1
	game.Players.LocalPlayer.CameraMaxZoomDistance = 0.5
	game.Players.LocalPlayer.CameraMinZoomDistance = 0.5
end)
	

so this is the script i tried to change the min and max distance but it says attepted nil with "CameraMaxZoomDistance "

3 comments

0

Try replacing game.Players.LocalPlayer at the end to game.StarterPlayer

0

The server can't use LocalPlayer.

0

Oh ok