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

How do I make an on / off model spawner?

Asked by
Fogolo 0
3 years ago

So I'm a new scripter trying to make a button where it spawns a model when clicked but when a off button is clicked it removes the model but it can spawn again with the on button pressed.

V this script is in the "ON" green button I tried making that spawns it but I can't figure out how to make an off button that removes the model from workspace and then the on button can spawn it back again after its removed

any help?


function onClick() game.ReplicatedStorage.testmodel.Parent = game.Workspace end script.Parent.ClickDetector.MouseClick:connect(onClick)

Answer this question