Hi y'all. Im still very much new to Roblox Studios and working my way up with Luau. But one thing that got my attention was the way scripts work. As to my knowledge all scripts get called at the start of the game and do certain things etc.
But how could you use entities? As to my knowledge I would have to store their model and logic somewhere in the world and replicate them when they need to spawn. But how would I go about making their logic only run when spawned and not when they just exist outside of the play area, waiting to be duplicated and spawnd. (Let me know if this is the wrong idea of managin entity models).
That is part one of my question. Part two is "How can you efficiently make scripts comminicate with one another?" I heard about module scripts as a form of "global" script that anyone can call toward. But I dont know if thats the way to go. Like lets say I want a script in a bear comminicate with a script in a tree and make that tree fall down or smth.
And for the last part of my question; "When to use what script and where?"
As far as I know you have normal scripts, module scripts, scripts in the server( serverscript holding thingy ), client scripts( clientscript holding thingy ) and possible more?
But when should I make a script inside the server hold and when in the client? What's the use of normal scripts( the grey ones ) as I could also run them in the server or client hold?
Sorry for all these questions but this is my major confusion from switching from Godot to Roblox Studios. The way scripts comm and where they are stored are just way diff from the Godot engine. And making like three diff posts for this in here seems like overkill.
I am so thankfull for everyone who will try and explain this to my 😂 🙏
** You are now Level 12! **