My other question got removed by a mod for some reason.But, thank you to the guy/girl who helped me with this script sorry for reposting this. I hope you don't get mad at me. But, anyways I was trying to do is when the player press the button the tree explodes into pieces. Here's the script.
function onClicked(playerWhoClicked) workspace["Tree"]:explode() end script.Parent.ClickDetector.MouseClick:Connect(onClicked)
function onClicked(playerWhoClicked) local t = workspace:FindFirstChild("Tree") t:Destroy() end script.Parent.ClickDetector.MouseClick:Connect(onClicked) -- if your trying to remove it. function onClicked(playerWhoClicked) local t = workspace:FindFirstChild("Tree") local ex = Instance.new("Explosion") ex.Parent = t end script.Parent.ClickDetector.MouseClick:Connect(onClicked) -- to explode