Different skybox in different zones

Hey devfourm!
I’m currently developing a game with different zones and I’m trying to change the skybox.
Let me explain:
When a player enters the lava zone, the skybox changes from blue sky to something else. Skybox in different zones. Is this possible? Thanks.

2 Likes

This is possible yes, you could simply have a LocalScript that checks what zone they’re in, then change add a skybox into Lighting for that zone, and remove the old one.

3 Likes

It has to be in localscript to change only for a specific player. Right?

1 Like

Yep! LocalScripts are on the client end, so it won’t actually change it for everyone (just for that one person. Hopefully this helped!

P.S. Sorry for just jumping into the conversation.

3 Likes

Yes, to do it per player and have it show to each player and not change the skybox for everyone based on the most recently checked player, it would need to be a LocalScript.

3 Likes

Where should I put this localscript? In the touching part?

1 Like

Don’t put them in parts as they can only work if they are a child of the player, or their character.

You could put it in StarterPlayerScripts or StarterCharacterScripts, then have a path to the touch part and change the skybox when they touch it.

2 Likes

Something like that?

2 Likes

Yup! Just like that! That should do the trick for it and make it change the skybox.

1 Like

I justed tested it. Thank you so much.
Thank you both! Have a great day :heart:

3 Likes

Sorry for the another response! :smile:
https://gyazo.com/ec91ab6974d6d5575baf9b2c1441f838

3 Likes

Another way you could do it is by having it check the HumanoidRootPart’s distance from a part and put the part in the middle (This would work better for circular zones) or using Region3s (better for square / rectangle zones.)