Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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)
0
Thanks! It works. LioshaPlay 66 — 4y
0
No Problem! Good Luck with the game. Baselistic 103 — 4y
Ad

Answer this question