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

My Skybox won't clone into the lighting tab?

Asked by 5 years ago
Edited 5 years ago

So my script won't clone this skybox into the lighting when I need it to, can someone help me?


while wait(0) do if script.Parent == workspace then local galaxy = script.Parent:WaitForChild("Purple Nebula"):Clone() galaxy.Parent = game.Lighting wait(10) galaxy:Destroy() end end
0
why did you unaccept my answer? 3wdo 198 — 5y
0
It didn't work jorcorrs 76 — 5y

1 answer

Log in to vote
0
Answered by
3wdo 198
5 years ago

Try this

while true do
    wait(1) -- change 1 to what ever you want
    if script.Parent == workspace then
        local galaxy = script.Parent:WaitForChild("Purple Nebula")
        galaxy:Clone().Parent = game.Lighting -- this puts it in lighting
        wait(10)
        game.Workspace:WaitForChild("Purple Nebula"):Destroy() -- this should destroy it
    end
end

Ad

Answer this question