local hrp = game.Players.LocalPlayer.Character.HumanoidRootPart
local closestPlot, shortestDist = nil, math.huge
local plots = workspace.Map.Plots
for _, plot in pairs(plots:GetChildren()) do
local part = plot:FindFirstChildWhichIsA("BasePart", true)
if part then
local dist = (part.Position - hrp.Position).Magnitude
if dist < shortestDist then
shortestDist, myPlot = dist, plot
end
end
end
if myPlot then
while task.wait(25) do
for i, v in pairs(closestPlot.Slots:GetDescendants()) do
if v.Name == "Touch" then
firetouchinterest(hrp, v, 0)
task.wait()
firetouchinterest(hrp, v, 1)
end
end
end
end
Comments
change 25 to however long you want it to sell at