I need to find a way to use touches like mouse events. It’s like mouse.Target but instead of mouse I want it to work on mobiles also. How do I do it?
2 Likes
Mouse.Target is a thing, but works differently for mobiles, through the use of TouchTapInWorld
local UIS = game:GetService("UserInputService")
local plr= game.Players.LocalPlayer
local Mouse = plr:GetMouse()
UIS.TouchTapInWorld:Connect(function(vector2Pos, Processed)
if not Processed then
print(Mouse.Target)
end
end)
3 Likes