I am trying to make an event which, when fired, changes the value of a NumberValue. But it doesn’t change the value.
Local Script (Located inside a TextButton):
local RS = game:GetService("ReplicatedStorage")
local button = script.Parent
button.MouseButton1Click:Connect(function()
RS.AnomalyReport_EVENTS.SelectAnomaly:FireServer(1)
end)
Server Script:
local RS = game:GetService("ReplicatedStorage")
local configFolder = workspace.Game:FindFirstChild("Config")
RS.AnomalyReport_EVENTS.SelectAnomaly.OnServerEvent:Connect(function(value)
configFolder.SelectedAnomaly.Value = value
end)
In addition, this warning is outputted:
value of type Instance cannot be converted to a number