Value sensing not working

I need to make a tree change it’s parent when broken/Health. Value = 0
It doesn’t sense when the Health reaches 0
I tried while true do but it still didn’t work
Script:

Health:GetPropertyChangedSignal("Value"):Connect(function()
	if Health.Value <= 0 then
		tree.Parent = game.ReplicatedStorage.BrokenObjects
		Health.Value = MaxHealth
		wait(180)
		tree.Parent = game.Workspace.Objects
		local clone1 = drop1:Clone()
		clone1.Parent = game.Workspace
		clone1.Position = tree.Position
		local clone2 = drop1:Clone()
		clone2.Parent = game.Workspace
		clone2.Position = tree.Position
		local clone3 = drop2:Clone()
		clone3.Parent = game.Workspace
		clone3.Position = tree.Position
	end
	wait()
end)
Health.Changed:Connect(function(value)

	if value <= 0 then
		tree.Parent = game.ReplicatedStorage.BrokenObjects
		Health.Value = MaxHealth
		wait(180)
		tree.Parent = game.Workspace.Objects
		local clone1 = drop1:Clone()
		clone1.Parent = game.Workspace
		clone1.Position = tree.Position
		local clone2 = drop1:Clone()
		clone2.Parent = game.Workspace
		clone2.Position = tree.Position
		local clone3 = drop2:Clone()
		clone3.Parent = game.Workspace
		clone3.Position = tree.Position
	end

end)

Works for me

local Tree = script.Parent
local Health = script.Parent:WaitForChild("Health")
local MaxHealth = script.Parent:WaitForChild("MaxHealth")

Health:GetPropertyChangedSignal("Value"):Connect(function()
	if Health.Value <= 0 then
		Tree.Parent = game.ReplicatedStorage.BrokenObjects
		Health.Value = MaxHealth.Value
		print("Dead")
	end
	wait()
end)

It keeps saying Workspace.Objects.Tree.Script:7: attempt to index number with ‘Changed’

Does my code above not work for you?

I got it to detect, I just need to figure out how to move the clones of the blocks to the tree position.

What exactly is the cloning? The tree? Wood logs?

It clones wood from replicated storage and is supposed to bring it to the tree position before it teleports

Maybe try setting a PrimaryPart on the the tree and then saying
clone1.Position = tree.PrimaryPart.Position

or clone1.PrimaryPart.Position = tree.PrimaryPart.Position if the log is also a model

Usually you’d want to move models by their PrimaryPart so it could be causing the issue, also wouldn’t you want to drop the logs before the 180 second wait period?

I fixed that part of it already.

I guess technically you could just put the trees in a folder or something in workspace and do this

local Trees = game.Workspace:WaitForChild("Trees")
for _, Tree in pairs(Trees:GetChildren()) do
		if Tree then
			Tree.Health.Changed:Connect(function(Value)
			if Value <=0 then
				Tree.Parent = game.ReplicatedStorage.BrokenObjects
				local Log1 = game.ReplicatedStorage.Log:Clone()
				Log1.Parent = game.Workspace
				Log1.PrimaryPart.Position = Tree.PrimaryPart.Position
				local Log2 = game.ReplicatedStorage.Log:Clone()
				Log2.Parent = game.Workspace
				Log2.PrimaryPart.Position = Tree.PrimaryPart.Position
				local Log3 = game.ReplicatedStorage.Log:Clone()
				Log3.Parent = game.Workspace
				Log3.PrimaryPart.Position = Tree.PrimaryPart.Position
				wait(180)
				Tree.Parent = game.Workspace.Trees
				Tree.Health.Value = Tree.MaxHealth.Value
			end
		end)
	end
end

Should work fine as long as the Tree model and Log model have a primary part

Did you get it working yet? Seems to work fine for me