If i use this script it works fine for 1 "tree" but if i want to copy and paste the tree multiple times on the map it does not work anymore. The script is placed inside the tree, how do i get it so the script only works within that model?
local click = script.Parent:WaitForChild("ClickDetector") click.MouseClick:Connect (function(player) for _,v in pairs (game.Workspace.SmallTree1.Leaves:GetChildren()) do if v:IsA("Part") then--Checks if the Child that is inside the Model is ClassName Part. v.Anchored = false end end for _,v in pairs (game.Workspace.SmallTree1.Logs:GetChildren()) do if v:IsA("Part") then--Checks if the Child that is inside the Model is ClassName Part. v.Anchored = false end end end)