Well, basically the following script does not want to receive the Fire from the localScript:
Confg.ChangeConfg.OnServerEvent:Connect(function(player: Player, setting: string, value: string)
if (not player.JuegoConfg:FindFirstChild(setting)) then return end
if (not ViewFPS[value]) then return end
player.JuegoConfg[setting].Value = value
ViewFPS[value](player)
if (not player.JuegoConfg:FindFirstChild(setting)) then return end
if (not ViewPing[value]) then return end
player.JuegoConfg[setting].Value = value
ViewPing[value](player)
if (not player.JuegoConfg:FindFirstChild(setting)) then return end
if (not VolumenDeBrillo[value]) then return end
player.JuegoConfg[setting].Value = value
VolumenDeBrillo[value](player)
end)
This script is like this so that it is more optimized according to me, but it does not receive the OnServerEvent. It works if the script is like this:
Confg.FPS.OnServerEvent:Connect(function(player: Player, setting: string, value: string)
if (not player.JuegoConfg:FindFirstChild(setting)) then return end
if (not ViewFPS[value]) then return end
player.JuegoConfg[setting].Value = value
ViewFPS[value](player)
end)
Confg.Ping.OnServerEvent:Connect(function(player: Player, setting: string, value: string)
if (not player.JuegoConfg:FindFirstChild(setting)) then return end
if (not ViewPing[value]) then return end
player.JuegoConfg[setting].Value = value
ViewPing[value](player)
end)
Confg.BrilloVol.OnServerEvent:Connect(function(player: Player, setting: string, value: string)
if (not player.JuegoConfg:FindFirstChild(setting)) then return end
if (not VolumenDeBrillo[value]) then return end
player.JuegoConfg[setting].Value = value
VolumenDeBrillo[value](player)
end)
But I want to do it the first way I put it, but when I put it like this, the script is not executed