I’m making a high graphics system.i made it but then i experienced the index nil issue.it wasnt happening before.
the script is also client.
tried searching on google but theres no forum about this.i became nervous.
Any ideas to fix this?
script:
task.wait(5)
local TS = game:GetService("TweenService")
local Lightning = game:GetService("Lighting")
local Enabled = false
script.Parent.MouseButton1Click:Connect(function()
script.Effect:Play()
if game:GetService("UserGameSettings").SavedQualityLevel.Value >= 8 then
if Enabled then
TS:Create(script.Parent.UIStroke,TweenInfo.new(0.25,Enum.EasingStyle.Quad),{Color = Color3.fromRGB(255,0,0)}):Play()
TS:Create(script.Parent,TweenInfo.new(0.25,Enum.EasingStyle.Quad),{TextColor3 = Color3.fromRGB(255,0,0)}):Play()
Lightning.SunRays.Enabled = false
Lightning.DepthOfField.Enabled = false
Enabled = false
else
TS:Create(script.Parent.UIStroke,TweenInfo.new(0.25,Enum.EasingStyle.Quad),{Color = Color3.fromRGB(0,255,0)}):Play()
TS:Create(script.Parent,TweenInfo.new(0.25,Enum.EasingStyle.Quad),{TextColor3 = Color3.fromRGB(0,255,0)}):Play()
Lightning.SunRays.Enabled = true
Lightning.DepthOfField.Enabled = true
Enabled = true
end
else
TS:Create(script.Parent.Parent.HighGraphicsWarning,TweenInfo.new(0.25,Enum.EasingStyle.Quad),{GroupTransparency = 0}):Play()
TS:Create(script.Parent.Parent.HighGraphicsWarning.UIStroke,TweenInfo.new(0.25,Enum.EasingStyle.Quad),{Transparency = 0}):Play()
script.Parent.Parent.HighGraphicsWarning.Description.Text = "Grafik seviyen 8 ile eşit veya yüksek olması gerekiyor.Çünkü yüksek grafiklerin çalışabilmesi için 8. grafik seviyesi gerekiyor.Kullandığın mevcut grafik seviyesi ise "..GameSettings.SavedQualityLevel.Value..".Grafik seviyeni 8'e çekerek sorunu düzeltebilirsin."
script.Error:Play()
end
end)