mouse.Move:Connect(function()
if IsDragging:GetAttribute("IsDragging") == false then
return
else
if script.Parent.ImageLabel.Size.Y.Offset > 25 then
script.Parent.SliderHandle.Position = UDim2.new(script.Parent.SliderHandle.Position.X.Scale,script.Parent.SliderHandle.Position.X.Offset,0.05,mouse.Y)
script.Parent.ImageLabel.Position = UDim2.new(script.Parent.ImageLabel.Position.X.Scale,script.Parent.ImageLabel.Position.X.Offset,-0.04,mouse.Y)
return
end
script.Parent.SliderHandle.Position = UDim2.new(script.Parent.SliderHandle.Position.X.Scale,script.Parent.SliderHandle.Position.X.Offset,0.05,mouse.Y)
script.Parent.ImageLabel.Size = UDim2.new(script.Parent.ImageLabel.Size.X.Scale,script.Parent.ImageLabel.Size.X.Offset,0.05,mouse.Y)
end
end)``` makes if OFFSET Y is 0-25, dragposition, Please you fix?
#i cannot Fix my luau script
1 messages · Page 1 of 1 (latest)
** You are now Level 7! **
i think you can use UiDragDetector
mouse.Move:Connect(function()
if not IsDragging:GetAttribute("IsDragging") then
return
else
if script.Parent.ImageLabel.Size.Y.Offset > 25 then
script.Parent.SliderHandle.Position = UDim2.new(script.Parent.SliderHandle.Position.X.Scale,script.Parent.SliderHandle.Position.X.Offset,0.05,mouse.Y)
script.Parent.ImageLabel.Position = UDim2.new(script.Parent.ImageLabel.Position.X.Scale,script.Parent.ImageLabel.Position.X.Offset,-0.04,mouse.Y)
return
end
script.Parent.SliderHandle.Position = UDim2.new(script.Parent.SliderHandle.Position.X.Scale,script.Parent.SliderHandle.Position.X.Offset,0.05,mouse.Y)
script.Parent.ImageLabel.Size = UDim2.new(script.Parent.ImageLabel.Size.X.Scale,script.Parent.ImageLabel.Size.X.Offset,0.05,mouse.Y)
end
end)
Why aren't you not refrencing your ImageLabels.
It's not a good practice
and in the top of if statement the check
Add a if not statement