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

Test is not a vaild member of test?

Asked by 7 years ago

Hello, helper, can you help me make a remove script for me where if you click on it and it will remove the thing click on it was it like something

Tree = game.Workspace.Tree

script.Parent.MouseButton1Down:connect(function()
tree.Destory()
end

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

You need to insert a click detector into the brick you have the script in.

script.Parent.ClickDetector.MouseClick:connect(function(plr)
    script.Parent:Destroy()
end)
Ad

Answer this question