Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I made a script to regen blocks once "destroyed" by a pickaxe, why doesn't it work?

Asked by 3 years ago
Edited 3 years ago

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)

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) FirewolfYT_751 223 — 3y

Answer this question