I need help with the player GUI. It is necessary that when a player steps on a brick, his GUI is turned on. It sounds simple, but I still have not figured out how to do it... All that bothers me is that when I start the game, the GUI is transferred to the player’s folder. I hope for help. Below I wrote a script in which it would be desirable to put the answer to this question.
Function WalkingOn(connected) --the answer is here script.Parent.Touched:connect(WalkingOn)
The above script is optional.
Edit: Solved! Who has a similar problem, I will leave a link to the download place. (copy the link to the address bar of the browser)
https://drive.google.com/file/d/1PN3m4p4tzXwSfMdEjCLudaDqcbqhCXYs/view
There is a few things you should notice: 1.It should be a local script 2.The local script should be a child of the ScreenGui Here is the script:
local part = game.Workspace.Part -- Where ever it is in the workspace local screenGui = script.Parent function screenGuiE() screenGui.Enabled = true end part.Touched:Connect(screenGuiE)