Hi, I am trying to make the skybox change while inside an area.
I found a script here, but it doesn’t seem to work for me. I’ve set it up how I think they meant, but the skybox does not change.
The script editor also says there is an error here.
I’m unsure of this, but essentially all you’re doing is parenting the old skybox to ReplicatedStorage skybox storage, then parenting the new one to Lighting like you were. Print right after the skybox code to make sure it’s running that code!
It throws an error because the person who send the sample code forgot to set the “)” at the end of their code.
It should have looked like this:
game.ReplicatedStorage.Remote.BiomeTrigger.OnClientEvent:Connect(function(SkyName)
local Sky = game.ReplicatedStorage:FindFirstChild(SkyName)
if Sky then
local newSky = Sky:Clone()
local newSky.Name = "Sky"
local oldSky = game.Lighting:FindFirstChild("Sky")
if oldSky then
oldSky:Destroy()
end
newSky.Parent = game.Lighting
end
end) -- here is where the ")" was missing