#Button Simulator help

1 messages · Page 1 of 1 (latest)

dense haven
#

hey, I just started to learn how to script in roblox and decided to follow a button simulator tutorial since I have played many games like it before. I tried to follow this video here: https://www.youtube.com/watch?v=PwXHKU4d-PA&t=410s
and after scripting the player detection code and running the program, I got this error message "touched is not a valid member of folder workspace.buttons.multiplier". I swear I had copied 1 to 1 what he had done in the video. So I was wondering if theres a fix to this? are there any tips for the future? and what I should look out for future bugs?

Thank You

Best BEGINNER GUIDE to Scripting your FIRST Roblox Game!

🚨Get an UPGRADED VERSION of the Game: https://www.shopdehapy.com/how-i-earn-50k-robux-per-month

Hey guys! In this video I show you all how to make your first roblox simulator while teaching the basics of coding! Let me know if you would like more tutorials!

⭐Start your dev journey...

▶ Play video
#

if theres any other info needed, I'd be happy to get the extra info to you

wide mauve
#

that error code is happening because ur trying to add the .Touched event to a 'Folder' instance

#

ur code is getting every instance inside the 'buttons' folder and adding a touched event to everything there

dense haven
#

i tried putting the script into other folders, but that didnt seem to work

wide mauve
#

u have to get the descendants of the multiplier folder instead

#

or

#

u can check if the value ur tryna add touched to is a part

#

so in the for loop add an if statement
if not Button:IsA("Part") then continue end

#

this will break the iteration and not add touched events to anything that isnt a part

#

This is the first episode and beginning to become a Roblox Scripter/Game Developer! With 3 playlists (Beginner, Advanced, GUI) containing 50+ videos and 30+ hours of content, I will guide you through this journey to start making the games you want to create on Roblox!

DISCORD 📜
Join my Discord Community if you want scripting help, participat...

▶ Play video
#

i recommend watching brawldevs tutorial playlists if u just started learning scripting

dense haven
#

like this?

wide mauve
#

add an 'end' right after the continue on line 7

#

and select line 7, and hit tab

wide mauve
#

copying code won't make you any better

#

u gotta understand what ur writing to improve

dense haven
#

yeah, I have heard that. The script still doesnt seem to work, but thats okay. thank you for your time and the roblox tutorial!

wide mauve
#

np and i recommend doing what i said here if u wanna see fast improvements and learn how to make stuff on ur own

dense haven