Well, I have had this problem for a long time and I don’t know how to solve it, the truth is that this script “changes” the Brightness, globalShadows and ShadowsSoftness. The script must detect a value and depending on the value, the function must make a change (bajo, Medio and Alto). But these functions are not performed and the value is not detected. It doesn’t give any error or anything.
local StringValueShadow = game.Players.LocalPlayer:WaitForChild("Graficos"):WaitForChild("Shadow")
StringValueShadow:GetPropertyChangedSignal("Value"):Connect(function()
wait()
if StringValueShadow.Value == "Bajo" then
for _, item in ipairs(workspace:GetDescendants()) do
if item:IsA("PointLight") then
Lighting.GlobalShadows = false
Lighting.ShadowSoftness = 1
end
item.Shadows = false
item.Brightness = 0.35
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
end
item.Shadows = false
item.Brightness = 0.35
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
end
item.Shadows = true
item.Brightness = 0.75
end
end
end)