Getting Error when attempting to add a value to the character

I keep getting an error called “Value is not a member of model ‘Workspace.W_aev’”
I am making a simple Plates of Fate style game and get this error.

here is my code
‘’'local GameData = game.ReplicatedStorage.GameData
local Assets = game.ServerStorage.Assets
local Folder = game.Workspace.Folder

local Status = GameData.Status

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

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

while wait() do
if CalculatePlayers() >= Settings.PlayersNeeded then
local PlayersInGame = {}
– where the game starts
for i = Settings.Intermission, 1, -1 do
Status.Value = "intermission - "…i
end

	Status.Value = "The battle is ready to begin!"
	
	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)
				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)
						local PlateValue = Instance.new("ObjectValue")
						PlateValue = 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)
else 
	-- not enough players
	Status.Value = "At least two players are needed to anger the gods!"
end

end
‘’’
the error is usually on the value PlateValue.Value = v

1 Like

You set PlateValue to be the player’s character and then try to get a property that models don’t have

local PlateValue = Instance.new("ObjectValue")
PlateValue = player.Character --This line is causing the issue
1 Like

so how would I fix this?
Thanks

1 Like

What are you trying to store in the PlateValue objectvalue? The player’s character or whatever v is?

1 Like

I’m trying to put player name so that all of the other plates with the value ‘’’ none ‘’’ get deleted from the game

1 Like

You can’t put a string inside of an ObjectValue, you need a StringValue for that

I figured it out. I didn’t put Platevalue.Parent = player.Character.
Instead I put plateValue = player.Character

1 Like