Changing skybox

Hello, I’ve encountered a programming issue, where I’ve made an attempt to change the skybox, but it’s not working.

The script:

local Lighting = game:GetService("Lighting")
--...
local Sky = Instance.new("Sky")
Sky.Parent = Lighting
Sky.SunAngularSize = 10
-- credits to @UndiscoveredLimited
Sky.SkyboxBk = "144933338"
Sky.SkyboxDn = "144931530"
Sky.SkyboxFt = "144933262"
Sky.SkyboxLf = "144933244"
Sky.SkyboxRt = "144933299"
Sky.SkyboxUp = "144931564"

But when I run it in studio, there is no sky parented to Lighting. Any help please?

1 Like

Your confusing this to much you can change it in the properties. You don’t need a script

1 Like

Yeah I know, but I wanna do it via script though.

1 Like

Why? It’s more confusing unless you plan on making more then one of her transfers

1 Like

I’m making a plugin for realistic lighting. There probably are lots of them, but I still wanna do it.

1 Like

You need to set it to a roblox asset id, not just the id

Sky.SkyboxBk = "rbxassetid://144933338"
2 Likes