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

Well i found my issue but how can i solve it?

Asked by
Myune 24
5 years ago

I recently posted a question for a totally different reason, I got an answer as to why it wasnt working which I appreciate. Now that I figured out WHY it wasnt working, my new issue is:

I have multiple parts of the same name(took me forever to figure out this is the reason for my troubles) I need to trigger a GUI notification ON TOUCHED event . How does one set up multiple parts with the same name to trigger 1 GUI on touched event? My workspace is set up like this:

There is a folder in my workspace with 3 different folders for different money that spawns on the map randomly. let's say folder A holds my Coins folder, there is 10 Coins that spawn all over the map, all with the same name "Coin". The GUI pops up and says something like "hey you found a Coin" and then closes and adds a point to your Coins (point system works fine, only GUI notice is the issue).

I already have the script needed. There was really no need for me to post my last question, but how can I have my GUI pop up for all of my Coins on the map? it only pops up for one.

Thanks for reading this bulky paragraph, any help is appreciated.

0
script pls User#23365 30 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago
for i ,v in pairs(workspace.Whatyouwant:GetChildren()) do -- Replace Whatyouwant with what needs to be touched
v.Touched:Connect(function()
Whatyouwant.Visible = true -- replace whatyouwant with guis
end)
end

I didn't really understand you but i hope this helps you out.

0
I need to get all parts the same name to bring up 1 gui. Myune 24 — 5y
0
can you please show me the way of all parts liek Lolamtic 63 — 5y
0
and also the way of the gui so i can do al Lolamtic 63 — 5y
Ad

Answer this question