Hello, (the following is a module script), my problem is that line 8 should search for a local player but it does not and gives an error
local ForzarActivacion = {}
ForzarActivacion.Indicador = {"cargando", "carga casí completa", "finalizado"}
local Lighting = game:GetService("Lighting")
ForzarActivacion.CargandoFuncionDeGraficos = function(Activacion, player)
local player = game.Players:FindFirstChild(player.Name)
local StringValueShadow = player.Graficos.Shadow
if StringValueShadow.Value == "Bajo" then
for _, item in ipairs(workspace:GetDescendants()) do
if item:IsA("PointLight") then
Lighting.GlobalShadows = false
Lighting.ShadowSoftness = 1
item.Shadows = false
item.Brightness = 0.35
print("Sombras en bajo")
end
end
elseif StringValueShadow.Value == "Medio" then
for _, item in ipairs(workspace:GetDescendants()) do
if item:IsA("PointLight") then
Lighting.GlobalShadows = true
Lighting.ShadowSoftness = 0.5
item.Shadows = false
item.Brightness = 0.35
print("Sombras en medio")
end
end
elseif StringValueShadow.Value == "Alto" then
for _, item in ipairs(workspace:GetDescendants()) do
if item:IsA("PointLight") then
Lighting.GlobalShadows = true
Lighting.ShadowSoftness = 0.1
item.Shadows = true
item.Brightness = 0.75
print("Sombras en alto")
end
end
end
end
return ForzarActivacion