Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a tool that spawns a model ONCE only and then deletes itself?

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)

2 comments

0

What exactly do you want removed?

0

the tool,after placing the model

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.