Hey I’ve tried to use TouchTapInWorld and use the first parameter to create a ray by putting it in :ViewportPointToRay() but that keeps returning nil. This is the script that I’ve created
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local uis = game:GetService("UserInputService")
local camera = game.Workspace.CurrentCamera
local filter = {}
uis.TouchTapInWorld:Connect(function(arg1, arg2)
local ray = camera:ViewportPointToRay(arg1.X, arg1.Y , 900)
local target, point, surface = game.Workspace:FindPartOnRayWithIgnoreList(ray, filter)
print(target)
end)
I cannot use mouse.Target because I need a TargetFilter with more than 1 object to ignore.