Attempt to index nil with "Claimed" (boolean value)

I was trying to make a “Claim Board” system but got an unexpected error.
I don’t think I could fix it. Below is my script and help is appreciated.

script.Parent.MouseButton1Click:Connect(function(plr)
	if plr.Claimed.Value == true then
		if plr.Name == script.Parent.Parent.Parent.Parent.Values.Owner.Value then
			wait(math.random(1.5, 5))
			script.Parent.Parent.Parent.Parent.Clicker.BrickColor = BrickColor.new("Lime green")
			while plr.Clicked == false do
				wait(0.001)
				plr.Values.ReactionTime.Value += 0.001
				script.Parent.Parent.Parent.Parent.Timer.SurfaceGui.TextLabel.Text = plr.Values.ReactionTime
			end
		end
	end
end)

script.Parent.Parent.Parent.Parent.Clicker.ClickDetector.MouseClick:Connect(function(plr)
	if plr.Claimed.Value == true then
		if plr.Name == script.Parent.Parent.Parent.Parent.Values.Owner.Value then
			plr.Clicked = true
			script.Parent.Parent.Parent.Parent.Timer.SurfaceGui.TextLabel.Text = "Your Reaction Time: "..tostring(plr.Values.ReactionTime.Value)
			if plr.Values.ReactionTime.Value < plr.Values.BestTime.Value then
				plr.Values.BestTime.Value = plr.Values.ReactionTime.Value
				plr.Values.ReactionTime.Value = 0
			end
		end
	end
end)

Theres probably no object called “Clicked” inside the player, and you also want to make sure you’re getting the values of your objects (plr.Clicked.Value)

Mouse button 1 click doesnt return the player who clicked it. Instead you can access the player with game.Players.LocalPlayer since this is a local script. Also please assign variables instead of doing script.Parent.Parent….

MouseButton1Click returns no parameters?? where did you even get plr from

also please use variables instead of script.Parent spam :sob:

and point out the line where the error is happening i am NOT digging through that

Even if it does (I still doubt it), its much more practical to use the local player since its so readily accessible

No its dont have parrameters i got confused with Mousclick sorry for that

I did it with localscript but still doesnt work

Did you see my post? MouseButton1Click doesn’t return a player param. So you are editing the boolean of a nil value. Get the player with game.Players.LocalPlayer and edit that player object

i did but still didnt work though

UPDATE: IT HAS NO ERRORS BUT IT DOESN’T WORK.
HERE IS MY SCRIPT(CURRENT)(local script):

model = script.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer
	print("It is working")
	if plr.Claimed.Value == true then
		if plr.Name == model.Values.Owner.Value then
			model.Timer.SurfaceGui.TextLabel.Text = "Wait for green..."
			wait(math.random(1.5, 5))
			model.Timer.SurfaceGui.TextLabel.Text = "Click the green!"
			model.Clicker.BrickColor = BrickColor.new("Lime green")
			while plr.Clicked.Value == false do
				wait(0.001)
				plr.Values.ReactionTime.Value += 0.001
			end
		end
	end
end)

model.Clicker.ClickDetector.MouseClick:Connect(function()
	local plr = game.Players.LocalPlayer
	if model.Clicker.BrickColor.Color == BrickColor.new("Lime green").Color then
		if plr.Claimed.Value == true then
			if plr.Name == model.Values.Owner.Value then
				plr.Clicked.Value = true
				model.Timer.SurfaceGui.TextLabel.Text = "Your Reaction Time: "..tostring(plr.Values.ReactionTime.Value)
				if plr.Values.ReactionTime.Value < plr.Values.BestTime.Value then
					plr.Values.BestTime.Value = plr.Values.ReactionTime.Value
					plr.Values.ReactionTime.Value = 0
				end
			end
		end
	end
end)

These are some reasons why its not working

  1. claimed is not a child of Player
  2. the script is not In ServerScriptService
    And click detector has the parameter player so You can use it on a server script !

if your script is in workspace, it will not work, either move the script to a client environment and change the variables to work with the new path, or rewrite the script in a server environment, and keeping its current path.

Also show what your output says related to this script.