Why would this small part of a script not work?

Hello a very small part of my script isint working. Any help?
Screen Shot 2022-04-20 at 6.27.51 PM

Any errors? try debugging by using print() to see which parts work.

1 Like

It prints but it dosent work. frsfsdfsdfsd

I also suggest to use if not rather than what your doing here:

while true do
  wait(0.1)
    if not game.Workspace:FindFirstChild("Configuration") then -- use not if there is something not existent 
        local original = script.Parent.Configuration
        local copy = original:Clone()
        copy.Parent = game.Workspace
    end
end
1 Like

where does it work with the print?

Still dosent work. (fdsnjfsdjkfhdsjfhsdkfsdh)

Is your game published to Roblox?

Yes everything should work but It did not for some reason.

local configuration = game.Workspace:FindFirstChild("Configuration")
while true do
  wait(0.1)
    if not configuration then -- use not if there is something not existent 
        local original = script.Parent.Configuration
        local copy = original:Clone()
        copy.Parent = game.Workspace
        print("Success")
    end
end

try telling me if it prints “Success”

Edit: You also have to know that since you are copying the parent it is also copying the script.