SO my friend made a brightness slider for my game.
In the testing place, the exposure was just the normal value.
But in the ACTUAL game, its -3
So the slider doesnt properly adjust brightness, because its not the normal value.
Heres the script:
local runService = game:GetService("RunService")
local userInputService = game:GetService("UserInputService")
local lighting = game:GetService("Lighting")
local BSlider = script.Parent:WaitForChild("SettingScroll"):WaitForChild("BrightnessSlider")
local slider = BSlider:WaitForChild("Slider")
local draggingConnection = nil
slider.Position = UDim2.fromOffset((BSlider.AbsoluteSize.X / 2) - (slider.AbsoluteSize.X / 2), 0)
function dragging()
if userInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) == false then
draggingConnection:Disconnect()
end
local mousePosition = userInputService:GetMouseLocation()
slider.Position = UDim2.fromOffset(math.clamp((mousePosition.X - BSlider.AbsolutePosition.X) - slider.AbsoluteSize.X / 2, 0, BSlider.AbsoluteSize.X - slider.AbsoluteSize.X), 0)
lighting.ExposureCompensation = (((slider.AbsolutePosition.X - BSlider.AbsolutePosition.X) / (BSlider.AbsoluteSize.X - slider.AbsoluteSize.X)) - 0.5) * 2.4 --i need to add here
end
slider.MouseButton1Down:Connect(function()
draggingConnection = runService.RenderStepped:Connect(dragging)
end)