I made a script to regen blocks once "destroyed" by a pickaxe, But it just doesn't do anything or print the message. What am I doing wrong?

Script:

local part = script.Parent

local changeActive = false

local function parentchange()

if changeActive == false then

	print("Parent Changed!")

	changeActive = true

	wait(30)

	part.Parent = game.Workspace

	changeActive = false

end

end

part:GetPropertyChangedSignal("Parent"):Connect(parentchange)

1 comment

0

is the parent actually changing? if this is a server script, the parent needs to change from a server script as well (not a local script)