Trying to set a max distance for a build system

Wait which post…???

if distance <= maxDistance then
BuildItems[i].BrickColor = BrickColor.new("Lime green") -- It was missing
BuildItems[i].Position = mouse.Hit.Position
BuildItems[i].Parent = workspace.MouseIgnoreModel
else
BuildItems[i].BrickColor = BrickColor.new("Really red")
BuildItems[i].Position = mouse.Hit.Position
BuildItems[i].Parent = workspace.MouseIgnoreModel
end

The first post I’ve marked as a solution! Thanks so much!