Getting error with my GameHandler code

So Ive been working on a Plates Of Fate style game, and I’ve been getting this error when choosing events.

attempt to index nil with ‘FindFirstChild’

This happens on this part of the script

local function Events(Player)
local RandomEvent = math.random(1,5)
local Plate = Player.Character:FindFirstChild(“PlateValue”).Value

and ive tried everything to fix it. Any suggestions?

‘’’

local GameData = game.ReplicatedStorage.GameData
local Assets = game.ServerStorage.Assets
local Folder = game.Workspace.Folder
local TweenService = game:GetService(“TweenService”)
local Status = GameData.Status
local PlateValue = Instance.new(“ObjectValue”)

local Settings = {
Intermission = 25,
PlayersNeeded = 1,
TimeBetweenEvents = 5,
RoundInProgress = GameData.RoundInProgress.Value
}

local function CalculatePlayers()
local NumberOfPlayers = #game.Players:GetPlayers()
return NumberOfPlayers
end

local function Events(Player)
local RandomEvent = math.random(1,5)
local Plate = Player.Character:FindFirstChild(“PlateValue”).Value

if RandomEvent == 1 then
	Status.Value = Player.Name.. " Plate will turn green"
	Plate.PartColor = BrickColor.new("Shamrock")
elseif RandomEvent == 2 then
	local Shrink = math.random(20, 85)
	Status.Value = Player.Name.. " plate will be crushed "..Shrink.. " studs."
	local ShrinkInfo = TweenInfo.new(
		0.75,
		Enum.EarningStyle.Linear,
		Enum.EarningDirection.Out,
		0,
		false,
		0
	)
	local Tween = TweenService:Create(Plate, ShrinkInfo, (Plate.Size - Vector3.new(Shrink, 0, Shrink))):Play()
elseif RandomEvent == 3 then
	local Grow = math.random(20, 85)
	Status.Value = Player.Name.. " plate will be gifted with "..Grow.. " studs."
	local ShrinkInfo = TweenInfo.new(
		0.75,
		Enum.EarningStyle.Linear,
		Enum.EarningDirection.Out,
		0,
		false,
		0
	)
	local Tween = TweenService:Create(Plate, ShrinkInfo, (Plate.Size - Vector3.new(Grow, 0, Grow))):Play()
elseif RandomEvent == 4 then
	Status.Value = Player.Name.. " will be dried up to dust"
	Plate.Material = "Sand"
elseif RandomEvent == 5 then
	Status.Value = Player.Name.. " will get a drooling nuisance"
	local Zombie = Assets["Drooling Zombie"]:Clone()
	Zombie.Parent = game.Workspace
	Zombie.HumanoidRootPart.Cframe = Plate.CFrame * CFrame.new(0, 2, 0)
end

end

while wait() do
if CalculatePlayers() >= Settings.PlayersNeeded then
for i, v in pairs(Folder:GetChildren()) do
if v then
v:Destroy()
end
end

	local PlayersInGame = {}
	-- where the game starts
	for i = Settings.Intermission, 1, -1 do
		Status.Value = "intermission - "..i
	end
	
	Status.Value = "The Round is ready to begin!"
	Settings.RoundInProgress = true
	wait(5)
	local Plates = Assets.Plates:Clone()
	Plates.Parent = game.Workspace.Folder
	
	for keyvalue, Player in pairs(game.Players:GetPlayers()) do
		if Player.Character:FindFirstChild("Humanoid") then
			if Player.Character.Humanoid.Health >=1 then
				table.insert(PlayersInGame, keyvalue, Player)
				Player.Team = game.Teams.Survivors
				for i, v in pairs(Plates:GetChildren()) do
					if v.Settings.OwnerOfPlate.Value == "None" and not Player.Character:FindFirstChild("PlateValue") then 
						v.Settings.OwnerOfPlate.Value = Player.Name
						Player.Character.HumanoidRootPart.CFrame = v.CFrame * CFrame.new(0, 2, 0)
						PlateValue.Parent = Player.Character
						PlateValue.Value = v
						PlateValue.Name = "PlateValue"
					end
				end
			end
		end
	end
	
	for i, v in pairs(Plates:GetChildren()) do
		if v.Settings.OwnerOfPlate.Value == "None" then
			v:Destroy()
		end
	end
	
	wait(5)
	
	repeat
		for i = Settings.TimeBetweenEvents, 1, -1 do
			Status.Value = "Next Event is in "..i.. " seconds!"
			wait(1)
		end
		if #PlayersInGame >= 1 then
			local Value = math.random(1, #PlayersInGame)
			local RandomPlayer = PlayersInGame
			
			Events(RandomPlayer)
			wait(5)
		else
			for i, v in pairs(PlayersInGame) do
				table.remove(PlayersInGame, 1)
				
			end
		end
	until Settings.RoundInProgress == false
else 
	-- not enough players
	Status.Value = "At least two players are needed to anger the gods!"
end

end
‘’’

Format the script correctly, I can’t read it.

image
image

Check if Player.Character exists first