Hello, I’m a noobie/rookie developer on roblox and this is my first time posting stuff there.
So, I’m trying to make something, that when the player press a button a value get checked, and it’s not working. So here is the code.
local RainM = {}
local ReplicatedStorage = game.ReplicatedStorage
local ServerStorage = game.ServerStorage
local ScreenGUI = game.StarterGui
--// Change The class name of Script
local function CreateRaining()
local Raining_Boolean = Instance.new("BoolValue")
Raining_Boolean.Name = "Raining"
Raining_Boolean.Parent = ServerStorage
Raining_Boolean.Value = false
end
local function RainingEnabled()
local Raining = ServerStorage:FindFirstChild("Raining")
Raining.Value = true
end
local function RainingDisabled()
local Raining = ServerStorage:FindFirstChild("Raining")
Raining.Value = false
end
--// Enable Rain
ScreenGUI.Game_UI.Testing.Raining_UI.Frame.Enable.MouseButton1Up:Connect(RainingEnabled,ReplicatedStorage.MainGame.Events.SIUUU:FireServer())
ScreenGUI.Game_UI.Testing.Raining_UI.Frame.Disable.MouseButton1Up:Connect(RainingDisabled,ReplicatedStorage.MainGame.Events.SIUUU:FireServer())
print("Working")
return RainM, CreateRaining()```