Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can somebody help me with my weather script? The rain sound effect won't play.

Asked by
kom297 -4
5 years ago
Edited 5 years ago

Here is my script

local Rain = game.Workspace.Weather.RainArea.ParticleEmitter
local Snow = game.Workspace.Weather.SnowArea.ParticleEmitter
local RainSky = game.ServerStorage.Rain
local Clone = RainSky:Clone()

function rainOn()
    Rain.Enabled = true
    game.Workspace.Sound:Play()
    Clone.Parent = game.Lighting
    print("Rain Turned On")
end

function rainOff()
    Rain.Enabled = false
    game.Workspace.Sound:Stop()
    Clone:Destroy()
    print("Rain Turned Off")
end

function snowOn()
    Snow.Enabled = true
end

function snowOff()
    Snow.Enabled = false
end

repeat
    rainOn()
    print("Currently Raining")
    wait(300)
    print("No longer raining")
    rainOff()
    wait(1800)
until game.Workspace.Weather.WeatherEmabled == false
0
I think you need to play the sound on the client ... i think ForeverBrown 356 — 5y
0
Where is that? kom297 -4 — 5y
0
Why is the clone going in Lighting? Lighting is not meant for storage. User#24403 69 — 5y
0
Its a sky kom297 -4 — 5y
View all comments (5 more)
0
if your question is where is the client .. then my question to you is, do you know what filtering enabled is? ForeverBrown 356 — 5y
0
Just to clarify, this a normal script in workspace, correct? If it is, make sure your sounds are also in workspace. (They can be played across the server if called on the server) Lugical 425 — 5y
0
Yeah its in workspace kom297 -4 — 5y
0
And its a normal script kom297 -4 — 5y
0
I just updated what my script is now kom297 -4 — 5y

Answer this question