Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing values help? [unanswered]

Asked by 9 years ago

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)
0
Anything on the output? TroytheDestroyer 75 — 9y
0
I'm a bit confused. Are you trying to replace the brick that was placed on a Right Mouse Click? Shawnyg 4330 — 9y
0
no, what I am trying to do is that when you right mouse click it selects another brick, and when you press left click the brick you changed appears. biocommand 30 — 9y

Answer this question