For a sandbox/tycoon game im making, im trying to make a BillboardGUI with a TextButton that when you click it, it should delete a placed object. Here's the script:
function onClick() script.Parent.Parent.Parent.Parent = nil end script.Parent.MouseButton1Click:connect(onClick)
When i click on the TextButton, it does nothing. How do i fix this?
function onClick() script.Parent.Parent.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(onClick)
nil is a value
use :Destroy() if you want to delete a part.