script.Parent.MouseButton1Click:connect(function()
game.Workspace.Thing:Destroy()
end)
this code does work if placed in a local script, but there is an extra step!
this extra step is to either enable 'filtering enabled' which is a property in workspace, you can go to workspace and check that, or you can place the part in the player's camera, meaning you will need to do a bit more, I would use the first one, filtering enabled is helpful, as it will block most exploits used by other players, like song exploits and others, but if you have most of your game made, I would not suggest to do it right now, or you might need to recode the whole game, but remember to enable it on any next project, ill do a quick localscript for the second option.
you will need to place the part you want later deleted in the script and rename the "Thing"s in the script to the part name and place the script in the button
script.Thing:Clone().Parent= game.Workspace.CurrentCamera
script.Parent.MouseButton1Click:connect(function()
game.Workspace.CurrentCamera.Thing:Destroy()
end)
2 comments
You tryna post your attempt though? Coz we ain't got time to spoon feed you.
k