i want a random model to be chosen from the model FallenTrees and set anchored and cancollide to false
local trees = {
script.Parent.FalledTrees.tree1,
script.Parent.FalledTrees.tree2
}
script.Parent.detector.Touched:Connect(function(hit)
game.ReplicatedStorage.events.detected:Fire(hit)
local r = trees[math.random(1, #trees)]
r:GetDescendants().Anchored = false
r:GetDescendants().CanCollide = false
task.wait(3)
r:Destroy()
end)
but it isnt working
also the :Destroy() Destroys everything in the table