mouseInputConnection = userInputService.InputChanged:Connect(function(inputObject)
print("Input began") -- NOT PRINTING WHEN MOUSE MOVED, BUT FUNCTION CONNECTED!
if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
print("Mouse moved - smth will occur")
local PosX = Mouse.X
local MinimalValue = 4
local MaximalValue = 1024
if MinimalValue < MaximalValue then
ScrollerButton.Position = UDim2.new(math.round(math.clamp((PosX - Offset) / ScrollerFrame.AbsoluteSize.X, 0, 1) * (MaximalValue - MinimalValue)) / (MaximalValue - MinimalValue), 0, 0.5, 0)
else
ScrollerButton.Position = UDim2.new(math.round(math.clamp((PosX - Offset) / ScrollerFrame.AbsoluteSize.X, 0, 1) * (MinimalValue - MaximalValue)) / (MinimalValue - MaximalValue), 0, 0.5, 0)
end
TextInput.Text = tostring(math.round((math.clamp((PosX - Offset) / ScrollerFrame.AbsoluteSize.X, 0, 1) * (MaximalValue - MinimalValue)) + MinimalValue))
Result = math.round((math.clamp((PosX - Offset) / ScrollerFrame.AbsoluteSize.X, 0, 1) * (MaximalValue - MinimalValue)) + MinimalValue)
end
end)
Why this connection not work on plugins, but working perfect in games? (Basically function which allows you making scrollers: