So, i have been attempting to create a self-playing player. (It’s only an experiment)
I wrote NN module and the machine learning algorithm and then i got this error.
I don’t know why did that happen.
“attempt to require a non-ModuleScript”
So, i have been attempting to create a self-playing player. (It’s only an experiment)
I wrote NN module and the machine learning algorithm and then i got this error.
I don’t know why did that happen.
“attempt to require a non-ModuleScript”
Seems fairly self-explanatory you must be calling require on a script which isn’t of the ModuleScript class.
Id - 8064765621
Seems like it’s a module
The script needs to be named “MainModule” if you’re requiring from an asset ID.
Have you named the MainModule you want to require the module when publishing it?
I named it exactly like this
Are you correctly returning a value at the end?
Yes
Yeah as mentioned above it needs to be named “MainModule” when saving as a model to Roblox.
Yes, because i need to do that from local script.
Am i supposed to use loadstring?
You can’t require modules by an id from the client.
Either store it in ReplicatedStorage or get the server to require it and return it through a remote function.
You could just have a hard-copy of the ModuleScript in the place.
You still can’t use loadstring on the client.