#Please help a beginner with scripting (quick question)

1 messages · Page 1 of 1 (latest)

torn edge
#

Hello, as a beginner I tried making a game and I realised each time I made a change like creating a folder or a model all of my scripts were broken since i have to change the location of the entity when defining the variable.
How do you all do to keep your scripts unchanged and change the location of parts or other freely in workspace?
Any reply would be much appreciated 👍

honest relic
#

Script.Parent

#

Easy way

trim widget
#

either design around it or use objectvalues (which has its own challenges) or depending on what it is you could use collectionservice etc

#

if you want hardcoded links then you will have to update every script that uses that link, or maybe use a modulescript which has all the links you need in a table so you only ever have to change that one table etc. design around it 👍

torn edge
torn edge
# honest relic Script.Parent

Is it a good idea btw to use findfirstchild instead of saying game.worspace.baseplate for example in case i move the bsplt in a folder?