This script is for a clean workspace GUI. Click Here to see the game When you click clean workspace it will delete you(the player) but I want to prevent that. But I don't know how to prevent that. I will deeply appreciate your help.
function onClick()
local workspaceChildren = game.Workspace:GetChildren()
wait(3)
for i = 1, #workspaceChildren do
if workspaceChildren[i].className == "Model" then
workspaceChildren[i]:Remove()
end
end
end
script.Parent.MouseButton1Click:Connect(onClick)

1 comment
I will smash that Accept Answer Button :-)