Hi, so i’m making a custom inventory system and i was trying to make the drag and drop system compatible for mobile players and i ran into a problem…
The problem is related to InputEnded, on PC InputEnded works if i stop clicking the button anywhere on the screen, but on mobile its only fired if i stop clicking on the button (idk how to explain it in a better way, but here’s a video)
Also part of my code:
NewTool.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch and ItemDragged == nil and Dragging == false then
print("Began: "..input.UserInputType.Name)
Dragging = true
ItemDragged = NewTool
--not relevant
end
end)
NewTool.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch and Dragging == true and ItemDragged == NewTool then
print("Ended: "..input.UserInputType.Name)
Dragging = false
ItemDragged = nil
--not relevant
end
end)
i would really appreciate if somebody could tell me if there’s a problem on my script or what’s happening…