#Touch detection in mobile
1 messages · Page 1 of 1 (latest)
Code?
it just firing in mousehit position
You are using UserInputService?
I think just checking if not processed as parameter good
Not understand, google the keywords in my sentence
local UserInputService = game:GetService("UserInputService")
UserInputService.TouchTap:Connect(function(touchPositions, processedByUI)
if processedByUI then return end
--Code here
end)
Does your code look like this?
no, it just about mousehit
is mousehit working both in pc and mobile?
like mousehit.position
so if it's touch, how to make it
i used mousehit.position 😭
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local mouse = player:GetMouse()
script.Parent.Activated:Connect(function()
local mouseHit = mouse.Hit
script.Parent.Throw:FireServer(mouseHit)
end)