Hello there!
I am trying to make it rain for all players in the server.
I would like the rain to be synced for all players from when the rain starts/stops, preferably without messing with things such as the rain attachments based on a player’s camera position.
I am using buildthomas’s plugin, Rain Plugin for the raining script
Since I have “RainScript” setup as the following at the end:
while true do
wait(math.random(5, 50))
Rain:Enable()
Drops.Enabled = true
wait(math.random(5, 50))
Rain:Disable()
Drops.Enabled = false
end
-- "Drops" refers to the local script which controls raindrops.
The rain will play at a random time, but random to a specific player, making different players have rain at different times. I’ve combined the rain with boatbomber’s Screen Rain by making the RainScript enable/disable the local script for the raindrops. I did that by converting the module script in charge of making the raindrops into a local script so it can be enabled/disabled, and putting it in the Rain Script.
Solutions I’ve tried
I’ve tried transferring the script “RainScript”+ to a normal script, but am given the error "RenderStepped event can only be used from local scripts " I’ve also tried making a normal script enable/disable the RainScript for players, which also gave me the same error.
Edit: Another failed solution
Quick update.
I just tried creating a script in ServerScriptService that would enable/disable the local rain scripts in PlayerScripts, but was met with the error code “ServerScriptService.DayCycles.Script:2: attempt to index nil with ‘PlayerScripts’”. Unsure as to why to why it thinks PlayerScripts does not exist. Once again, unsure if I am making beginner mistake and just missing something obvious haha.
local player = game.Players.LocalPlayer
local rainPlay = player.PlayerScripts.RainScript
local dropPlay = rainPlay.Raindrops
-- theres more to this script, but this is the section I got the error code from
Not sure if I’m missing something or making a rookie mistake since I am not very good at scripting, so please bare with me and any questions I may have. Any help is appreciated, thanks!