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

This doesn't work in game, please help?

Asked by 10 years ago
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.

0
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. Redbullusa 1580 — 10y

1 answer

Log in to vote
-1
Answered by 10 years ago

It's because you put

script.Parent.Parent = nil

Which means it is nothing.

0
But I want it to where I click something, it goes away. DDDropTheBase 0 — 10y
Ad

Answer this question