i made a model spawner but it spawns infinite copies as long as you click.i want a tool that spawns the model once and then deletes itself.heres what i have:
bin = .Parent
function onButton1Down(mouse)
local model = bin.Model:clone() --Change "Plane" to What Ever Model Name You Have model.Parent = game.Workspace model:MakeJoints() model:MoveTo(mouse.hit.p)
end
function onSelected(mouse) mouse.Icon = "rbxasset://textures\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end
bin.Selected:connect(onSelected)
Try putting it in an if then statement. This way, if the mouse is clicked, it'll spawn the model, then delete itself.
http://wiki.roblox.com/index.php?title=Conditional_statement