function Clicked()
script.Parent.Parent.Parent = nil
end
script.Parent.MouseButton1Click:connect(Clicked)
This doesn't work because, when I join the game, it's already gone.
function Clicked()
script.Parent.Parent.Parent = nil
end
script.Parent.MouseButton1Click:connect(Clicked)
This doesn't work because, when I join the game, it's already gone.
It's because you put
script.Parent.Parent = nil
Which means it is nothing.
But I want it to where I click something, it goes away.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
script.Parent.Parent.Parent:remove() will set it to nil, but since it's more ore less deprecated, use this instead: script.Parent.Parent.Parent:Destroy() because this will set it to nil and lock it.