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.
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.
It has to be in localscript to change only for a specific player. Right?
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.
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.
Where should I put this localscript? In the touching part?
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.
Yup! Just like that! That should do the trick for it and make it change the skybox.
I justed tested it. Thank you so much.
Thank you both! Have a great day
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.)