So i found this sliding gui i reconfigured it with Size instead of Position Using Position it changes the Volume but using Size it does not no errors occurring in the output here is the slider as a gif: https://gph.is/g/Z8JVXwz

-- Setting up unchanging variables
local bar = script.Parent.Bar;
local knob = bar.Knob;
local valueChangedEvent = script.Parent.ValueChanged;
local startXScale = -.05;
local endXScale = .95;
local mouse = game:GetService("Players").LocalPlayer:GetMouse()

-- Updates the Size of the knob as well as the value
local prevValue = nil;
local function Update()
	local absPosition = script.Parent.Bar.AbsolutePosition.X;
	local absSize = script.Parent.Bar.AbsoluteSize.X;
	local mouseDelta = math.min(math.max(0, mouse.X - absPosition), absSize);
	local value = script.Parent.MinValue.Value + ((mouseDelta / absSize) * (script.Parent.MaxValue.Value - script.Parent.MinValue.Value));
	knob.Size = UDim2.new((mouseDelta / absSize) - 0, knob.Size.X.Offset, knob.Size.Y.Scale, knob.Size.Y.Offset);--changed to Size here
	if (prevValue ~= nil and math.floor(prevValue) ~= math.floor(value)) then
		valueChangedEvent:Fire(prevValue, math.floor(value));
		prevValue = math.floor(value);
	else
		prevValue = math.floor(value);
	end
end

-- Coroutine to keep updating
local keepUpdating = false;
local function Updater()
	while (true) do
		if (keepUpdating) then
			Update()
		end
		wait(.05)
	end
end
local taskCoro = coroutine.create(Updater)
coroutine.resume(taskCoro);

-- Event Connecting
bar.MouseButton1Down:Connect(function()
	keepUpdating = true;
end)
local UserInputService = game:GetService("UserInputService")
UserInputService.InputEnded:Connect(function(inputObject)
	if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
		keepUpdating = false;
	end
end)

below is how you call the values and its supposed to change the volume when sliding right and left

local function onValueChanged(prevValue, newValue)
	if prevValue then
		game.SoundService.Sound.Volume = prevValue
	else
		if newValue then
			game.SoundService.Sound.Volume = newValue
		end
	end
end
script.Parent.Slider.ValueChanged.Event:Connect(onValueChanged)