local UIS = game:GetService("UserInputService")
local Players = game:GetService("Players")
plrs = {}
for i,v in pairs(game.Players:GetChildren()) do
table.insert(plrs,v:GetFullName()
end
for i = 1,#plrs do
local mouse = plrs[i]:GetMouse()
local function onInput(inputObject, gameProcessed)
if gameProcessed then return end
if inputObject.UserInputType == Enum.UserInputType.Touch then
target = mouse.Hit.p
print(mouse.Hit.p)
end
end
UIS.InputBegan:Connect(onInput)
Okay - I understand something else might error because I compiled this script at like 2 AM. When I try to print "mouse.Hit.p", it gives me an error stating that you cannot print a userdata value. Is there any fix to this? Help is greatly appreciated.

2 comments
Thank you so much! This was giving me a lot of trouble :P
My pleasure!