Local environment change

Changing environment properties locally

Hey there, i’m trying to make a script that changes some environment properties for a specific player by the press of a TextButton, just like in Super Hero Life III’s Roleplay menu, that allows you to change weather, and other roleplay stuff.

Anyone got any idea on how i can do it? Here’s some things i want to do:

Change weather to on/off
Change fog to close/far
Change day/night

Can anyone please help me? :slightly_smiling_face:

Hola,

If you would like the change the properties locally you can do so by just changing then from a local script.
If you’d like to change properties for the entire server you should use remote events/functions to send a signal to the server in order to change the properties.

Weather Change:
If you’d like to change the weather you’d probably have to script snow/rain/etc particles to be enabled and change the skybox

Fog:
To change fog you can do so in game.Lighting.FogStart and game.Lighting.FogEnd

Day/Night:
You can change the time of the day in many ways, but my favorite so far is by using game.Lighting.SetMinutesAfterMidnight(1-1440)

Hope I helped somewhat :woman_shrugging:

3 Likes

Hey, thanks, i did stuff simillar to that and it didn’t work, i just don’t want to seem like i’m an extreme begginer to coding, but thanks haha.

1 Like