local tree = script.Parent
function invisibletree()
if tree.Timber.Value == 1 then
tree.Leaves.CanCollide = false
tree.Leaves.Transparency = 1
tree.Trunk.CanCollide = false
tree.Trunk.Transparency = 1
wait(10)
tree.Leaves.CanCollide = true
tree.Leaves.Transparency = 0.011
tree.Trunk.CanCollide = true
tree.Trunk.Transparency = 0
tree.Timber.Value = 0
tree.hit.Value = 10
end
end
This script is inside a tree. Trunk and Leaves are both parts and Timber and hit are both IntValues. I am trying to make it so that whenever the Timber value ever goes to 1 then every physical thing on the tree will go fully transparent and cannot be collided with anything else and after 10 seconds, it would return to normal with the Timber value back at 0 and the hit value at 10 I made a script but it isn't working. Can someone help make it work? I am not that good at scripting.
Explorer Hirachy - 1 Game 2 Workspace 3 Tree 4 Script 4 Timber 4 hit 4 Leaves 4 Trunk
There are no children in Script, Timber, hit, Leaves or Trunk.
Thanks for your time.

1 comment
Didn't work buddy but thx anyway :]