Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I need help with enable gui, using touch script, for the implementation of the store (?)

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

1 answer

✓ Accepted answer

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)

2 comments

0

Thanks! It works.

0

No Problem! Good Luck with the game.

This discussion is preserved as it was. New answers, comments, and votes are closed.