So this script lets a player place a table after they click the script.Parent but when you select it, you can place all the tables you want. How can I make it so that you only can place one table when you click the parent?
grid = 3
grid2 = 6
local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()
mouse.Button1Down:connect(function()
local Spawn = game.Workspace.start
local Pos =(Vector3.new((mouse.Hit.p.X+grid) - (mouse.Hit.p.X+grid)%grid2, (Spawn.Position.Y+0.5), (mouse.Hit.p.Z+grid) - (mouse.Hit.p.Z+grid)%grid2)) --tree stump
local part = game.ReplicatedStorage.Table:Clone()
part.Position = Pos
part.Parent = game.Workspace
print("Table Placed")
end)

2 comments
Thank you for this answer, what I did was make a local value equaling zero and then when the function is ran, it adds one to it and if the value ~= 0 then the script ends but it seems to not work. Most likely I did something wrong. Could you provide a small example?
Anyways, I found another solution to my dilemma but I will accept this anyways because you put effort into it :)