[Fixed] What is wrong with this code?

Hello,
The past few days I’ve been working on a new project. :arrow_down:

I made a Local Script on Starter Gui but it doesn’t work.

My script:

[Script has been removed]

What I want this script to do is, when the Customer interacts with the Proximity a UI with the Cashier’s Tips there who is touching a TouchPad.

My Error:
When the Customer is interacting with the Proximity, the UI doesn’t pop up.

Thanks,
@PixelBytezz

There are a few issues I can see.

  • game.Players.PlayerAdded on client (clarify the reason for this)
  • Changing StarterGui properties
  • What is the remote’s function?

My mistake I used game.Players.PlayerAdded. So I want the remote to open the gui to the Customer but have the Cashier’s Data.

It’s good to see that your problem has been solved, but what caused the issue? It would be nice to know. It’s so other people who potentially have the same problem can maybe get it fixed without needing to make their own topic.

If your worried about people stealing your code, and so you removed it, I don’t think anybody will. It is broken after all, and the solution would probably have fixed code which you yourself can’t remove off the topic.

The problem was I used a Local Script instead of a Normal Script. I also made some changes to the script to check if the player is standing on the TouchPad.

The reason I removed the script is because it was wrongly written.

Thank you for pointing me out the issues, and I found the answer to my problem.

It was wrongly written, but why does it matter? Do you think people will use the broken code?

No. I know people won’t use the code I posted. I just felt like removing it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.