Hello scripting helpers! Today I tried to start working on my game, and started scripting a simple and easy to use stamper tool, like to one on welcome to roblox building, and what I have done so far is that when you click on any part it appears a brick, but what I wanted to do is that when you right click the mouse it changes the brick and when you left click the mouse it appears the brick you changed. Heres the code:
print 'tool script succesfully loaded' tool=script.Parent tool.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() B = game.Lighting.Brick B:Clone().Parent = workspace B.Position = mouse.Hit.p end) mouse.Button2Down:connect(function() B = game.Lighting.Granite end) mouse.Button2Down:connect(function() B = game.Lighting.Mahogany end) end)