How to make this script work on PC and MOBILE?

Hi.
I have a Spill/Clean system in my cafe.
However, I am trying to make it compatible with both PC and Mobile.

This is my script:

It works on PC, when you click anywhere on the screen, WHEN the mop is touching the spill. SO, It works great on PC.
BUT
On Mobile, it does not work when you click on the screen. Why is that?

If you know how to make this work, please let me know. Am I doing something wrong, or is there another way to do it?

Thanks :slight_smile:

To detect a touch on the screen, you can use Enum.UserInputType.Touch, so maybe just add an β€˜or’ after Enum.UserInputType.MouseButton1 in your script and put the code I told you.

Thank you.
I will try it out now!

1 Like

Great! It works.
Thank you!

3 0 c h a r a c h t e r s

Great, glad I could help! :grin: