Here is the script but the error says: 'Workspace.House1.Trigger.Script:6: attempt to index upvalue 'player' (a nil value)'
local player = game.Players.LocalPlayer
enabled = true
workspace:FindFirstChild("House1"):FindFirstChild("Trigger").Touched:connect(function(hit)
if (enabled == true) then
workspace:FindFirstChild("House1"):FindFirstChild("userId").Value = player.UserId
end
end)
