im making a script that theres 2 folders in replicatedStorage, both having settings for daytime and nighttime and the script will get the children from one of the folders and move the other children back into their folders, playing music with the theme/time, but it doesn't work, I'm suspecting that I'm using the wrong function and supposed to use something else instead of :GetChildren() but i don't know what it is, i would appreciate any help, I'm not very good at coding, the script is in workspace btw
local Lighting = game:GetService("Lighting")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local daySettings = ReplicatedStorage.Daytime:GetChildren()
local nightSettings = ReplicatedStorage.Nighttime:GetChildren()
local LightingChildren = game:GetService("Lighting"):GetChildren()
while true do
LightingChildren.Parent = nightSettings
daySettings.Parent = Lighting
script.Day:Play()
wait(378.346)
script.Day:Stop()
wait(1)
LightingChildren.Parent = daySettings
nightSettings.Parent = Lighting
script.Night:Play()
wait(257.291)
script.Night:Stop()
wait(1)
end

1 comment
sorry but, i dont get this answer