I'm trying to make a script to bring a skybox from serverstorage to lighting and the previous skybox to serverstorage, but it's not working.
while true do local skybox1 = game.lighting:FindFirstChild("Purple Nebula") local skybox2 = game.serverStore:FindFirstChild("Dark Skies") local serverStore = game:GetService("ServerStorage") Lighting = game.Lighting wait(5) skybox1.Parent = serverStore skybox2.Parent = Lighting wait(1) skybox2.Parent = serverStore skybox1.Parent = Lighting end
???
if script.Parent.Parent ~= game.Lighting then script.Parent.Parent = game.Lighting end
Hope this helps, pretty sure that would work. That would be if you were inserting the script into the actual skybox though. Otherwise, you'd put if game.Workspace.serverStore.skybox2.Parent ~= Lighting then
rather than if script.Parent.Parent ~= game.Lighting then
, so
if game.Workspace.serverStore.skybox2.Parent ~= Lighting then game.Workspace.serverStore.skybox2.Parent = Lighting end
should hopefully do the trick.