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.
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.