Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This doesn't work in game, please help?

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.

1 comment

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.

1 answer

It's because you put

script.Parent.Parent = nil

Which means it is nothing.

1 comment

0

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.