Hello, so I am making a plugin that does something when you click. So what I want to happen is: Player clicks plugin button Player clicks in workspace wherever they want Function executes and spawns block at that location Function resets so it can be used again
But, when I click on the button, and then click in Workspace, nothing happens. If you could help me it would be greatly appreciated.
Note: spawnBlock is already declared, as well as mouse, and button.
button.Click:connect(function() mouse.Button1Up:connect(function() spawnBlock(mouse.Origin) end) end)
"mouse" is not defined, you need to define it before it works:
button.Click:connect(function(mouse) -- Add "mouse" as a parameter mouse.Button1Up:connect(function() spawnBlock(mouse.Origin) end) end)