It seems that a lot of you are struggling with question 4 of the plugin episode. If you're unsure, I have published the solution & explanation here: gist.github.com/jotslo/984381b439aaf983f72c29e063ecdd62 --- Update: If you want to place a script somewhere outside of the folders mentioned in the video, take a look at the new RunContext feature, which is currently in beta. Learn more: devforum.roblox.com/t/beta-script-runcontext/1938784
I think the best way to solve it, is to take each segment of the challenge step-by-step. 1) First, create a function in your ModuleScript, which has one parameter. Your ModuleScript should be returning a reference to that function. (i.e. return functionName) 2) In the function, take the parameter, concatenate it with a smiley, and then return the new string. 3) In your main script, require the ModuleScript, and assign it to a variable for instance. This variable is now assigned to the function in your ModuleScript, so you can call it and then output the result. The idea of the challenge is to teach you that you can return any datatypes, rather than just tables as is commonly thought amongst some developers. Hope this helps!
Hey, thanks for the question! You can see an example of this at the bottom-right corner at 4:02 in this tutorial. The idea is that a function is a datatype that can be assigned to a variable, and so you can return the function datatype itself. Hopefully this helps, let me know if you’re still unsure!
looks like something is wrong with the plugin, I copied the solutions and pasted them in, but the output is still saying this: ScriptMate - Exercise failed. Requested module experienced an error while loading It could just be my studio
The example script is separated into examples, and can't be pasted on itself - could that be where you're going wrong? For example, you could just use "module script example 1" in your ModuleScript with nothing else, and then the main script example in your ScriptMateEnv. If you're still having issues, feel free to let me know the exact code you're using in your modulescript, and I can try to help!
hey idk if you still respond to these videos however for some reason i get this error code on the 4th question: "Module code did not return exactly one value" i have tried everything even copy pasted your solution from github yet it still gives me that error code, is there any way you could help me? loving the vids so far really easy to follow except for this one xD edit: nvm it worked for some reason after restarting roblox studio ? lol
It seems that a lot of you are struggling with question 4 of the plugin episode.
If you're unsure, I have published the solution & explanation here: gist.github.com/jotslo/984381b439aaf983f72c29e063ecdd62
---
Update: If you want to place a script somewhere outside of the folders mentioned in the video, take a look at the new RunContext feature, which is currently in beta.
Learn more: devforum.roblox.com/t/beta-script-runcontext/1938784
Amazing, you made a scripting newbie understand localscript easily. DESERVES MORE SUBS AND VIEWS!!!
Will you post others tutorial videos ? By the way, your videos are extremly useful ! Everything is explained so well !
I dont understand question 4 pls give me another hint I spent 2hours on that already
I think the best way to solve it, is to take each segment of the challenge step-by-step.
1) First, create a function in your ModuleScript, which has one parameter. Your ModuleScript should be returning a reference to that function. (i.e. return functionName)
2) In the function, take the parameter, concatenate it with a smiley, and then return the new string.
3) In your main script, require the ModuleScript, and assign it to a variable for instance. This variable is now assigned to the function in your ModuleScript, so you can call it and then output the result.
The idea of the challenge is to teach you that you can return any datatypes, rather than just tables as is commonly thought amongst some developers.
Hope this helps!
i need help on question 4(local & module)
returning a function wont work, and i dont know how to activate the function datatype when requiring.
Hey, thanks for the question!
You can see an example of this at the bottom-right corner at 4:02 in this tutorial.
The idea is that a function is a datatype that can be assigned to a variable, and so you can return the function datatype itself.
Hopefully this helps, let me know if you’re still unsure!
looks like something is wrong with the plugin, I copied the solutions and pasted them in, but the output is still saying this:
ScriptMate - Exercise failed.
Requested module experienced an error while loading
It could just be my studio
The example script is separated into examples, and can't be pasted on itself - could that be where you're going wrong?
For example, you could just use "module script example 1" in your ModuleScript with nothing else, and then the main script example in your ScriptMateEnv.
If you're still having issues, feel free to let me know the exact code you're using in your modulescript, and I can try to help!
@@jotslo yo bro, its happening to me aswell, copied the code and it doesnt seem to show anything, and yes I separated them properly
I need a bit of help with question 3 it seems im doing something wrong with returning the table from the modulescript
Hey, are you still looking for help or have you solved it?
@@jotslo Sorry for the late reply, heavent been on this account for a bit but yea i found the solution it was in the video.
hey idk if you still respond to these videos however for some reason i get this error code on the 4th question: "Module code did not return exactly one value" i have tried everything even copy pasted your solution from github yet it still gives me that error code, is there any way you could help me? loving the vids so far really easy to follow except for this one xD
edit: nvm it worked for some reason after restarting roblox studio ? lol
I do not understand question 4
i cant require from a local script
Make sure your ModuleScript is in a place that your LocalScript has access to
you so good at explainning
wth is question 4 😭it's so hard
its simple create a function newString(string) print(string.. " :)" require it in the script tester then call it with a random string as an argument