Path Giver Not Working on Mobile GetMouse() to Touch?

  1. What do you want to achieve? Keep it simple and clear!

I would like mobile users to be able to use the path giver

  1. What is the issue? Include screenshots / videos if possible!

The path giver works on pc with a controller but not on mobile.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have tried adding a mobile button that is bound to ButtonR2 but it wont make the path work on
mobile

Hello I have been using a free path giver from the toolbox it works well on pc with a controller
however I cant get it to work on mobile.
I have tried creating a mobile button bound to ButtonR2 but it wont work on mobile.

I have found on the devforum a ‘touch to raycast position’ but getting the result into the input
of the path giver is a struggle as I am just a beginner.

I would like the path giver to work for pc,xbox and mobile

and could do with some advice.

I will include a repo file to replicate the problem

game.Players.LocalPlayer:GetMouse().Hit.p)

I think this is causing the problem but Im not sure how to have the path open to all

Thanks for any advice or pointers

BluePathRepo.rbxl (29.0 KB)

1 Like

You’d need to use UserInputService’s InputObject.Position I believe to get the position that way if you want it to work on a mobile device, it should work the same as Hit.p for the mouse, giving you the correct positionings and such

1 Like

Thanks for the reply I had a look at inpt object. Position and it looks interesting. The main problem is that the path giver tool will not fire on mobile, it will not create a new instance of the block.

Maybe you implemented it the wrong way? I did actually take the time to make a re-production file if it works for you:

BluePathRepo v2.rbxl (29.0 KB)

3 Likes

Hello Thanks Very Much for taking the time to add to the code.

I have had to alter some variables and commands but it works as intended.

Thank you for your time
Have a great day

1 Like