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?