RealGoodDan

Generation

generate functionFri, 21 Jul 2023

Create a code in lua for roblox so when i press a button it deletes everything in the workspace when i press a button

#remember to press the run button to run the code #this code should delete everything in the workspace with a button click #lets say that the button is called "Button" #so the code should be (the button is connected to the server script, which is in this case called "script") script.Button.ClickDetector.MouseClick:Connect(function() #this code should loop through all the children of workspace for _,v in pairs(workspace:GetChildren()) do #this code should be able to delete the children of the workspace v:Destroy() end end)

Want to kickstart your project?Use the new AI Studio to create your code