Now my question is like, my game is a single player game but I can't use LocalPlayer in the script of the onTouch part, so how can I get to the playergui? I mean how can I get to the player in "players"?
Hey I got the answer you need to put the script in the main areas such as Serverscriptservice,Startergui or starterplayerscripts. So I would recommend putting the script in server script service.