Hello,
local e = false
script.Parent.MouseEnter:Connect(function()
e = true
end)
script.Parent.MouseLeave:Connect(function()
e = false
end)
local mou = game.Players.LocalPlayer:GetMouse()
game:GetService("RunService").RenderStepped:Connect(function()
if e==true then
script.Parent.Position=UDim2.new(0,math.clamp(mou.X-script.Parent.AbsolutePosition.X,0,script.Parent.AbsoluteSize.X),0,0)
end
end)
Math taken from: Gui Slider Math? - #6 by goldenstein64
- Br, iSyriux