How can I get the position of were the player clicked there thumb on the screen mobile as a Udim2?
I believe there is a property of mouse that lets you do this (Note that this is absolute position, so udim2 would be Udim2.new(0,mouse.X,0,mouse.Y):
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
uis.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
print(mouse.X)
print(mouse.Y)
end
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.