Plot Claiming Script Isn't working?

Hi there! I’m having trouble making a plot claiming script. This is it so far:

local Players = game:GetService("Players")

local part = script.Parent
local function onTouched(part)
	local player = Players:GetPlayerFromCharacter(part.Parent)
	if not player then return end
	local Plot1 = player:FindFirstChild("Plot1")
	if script.Parent.Parent["Plot 1"].Claimed.Value == false then
		print("It's not true")
script.Parent.Parent["Plot 1"].Claimed.Value == true
	end

part.Touched:Connect(onTouched)

Okay. Basically in studio, there is one part that you are teleported to, and when it is touched, the script fires. The only error in output is 12:45:35.326 - Workspace.Part.Script:12: Expected ‘end’ (to close ‘function’ at line 4), got ; did you forget to close ‘then’ at line 8? But there is no highlighted errors in the script editor. Any ideas anyone?

The function onTouched is missing an ending statement, add an end after you close your if and that will close onTouched.

Also, this line:
script.Parent.Parent["Plot 1"].Claimed.Value == true
I’m fairly certain you mean the assignment operator = instead of == (comparison)

Aha! It’s working now! Thanks so much! Also, if I use

script.Parent.Parent["Plot 1"].Claimed.Value = true

It thinks that I’m making something true. It highlights the equals in red.