I am making it so if a snow storm happens, it fires an event which changes a gui’s text. But it isn’t working with no errors.
Script for snowstorm.
local SnowStormEvent = game.ReplicatedStorage.SnowStormEvent
function SnowStorm()
game.Lighting.FogStart = 0
game.Lighting.FogEnd = 100
game.Lighting.ExposureCompensation = -2
print("Snow storm begins")
SnowStormEvent:FireAllClients()
end
function SnowStormEnd()
game.Lighting.FogStart = 500
game.Lighting.FogEnd = 1500
game.Lighting.ExposureCompensation = 0
print("Snow storm ends")
end
while true do
wait(16)
SnowStorm()
wait(45)
SnowStormEnd()
end
script for gui event
local TextGui = script.Parent
local Text = TextGui.TextLabel
local SnowStormEvent = game.ReplicatedStorage.SnowStormEvent
function ChangeText()
TextGui.Visible = true
Text = "Snow storm has been spotted!"
wait(3)
TextGui.Visible = false
end
SnowStormEvent.OnServerEvent:Connect(ChangeText)