Hello!
I’ve been looking into scripting within a game itself (not studio). Was wondering how to make something like this:
Thank you all in advance!
Hello!
I’ve been looking into scripting within a game itself (not studio). Was wondering how to make something like this:
Thank you all in advance!
You can make a gui muen with all the blocks then add the code in to each block. Use module scripts so you can call one the when needed
Can you go into a little more detail?
I am on mobile right now so i have to keep it short ish
Gui: make a frame with the blocks design you want.
I would use buttons so the player can click the block and it will clone to the “frame”
Scripts: In each block put in a module script that does what you want the block to do.
Have a main script the checks for the block added to the “frame” and the main script call the module script form the chosen block.
lets make an example:
we want to make a button that when clicked it anchors the part
so create a script with the function of anchoring the part when the button is touched,
put the script in the button GUI and is done
So would the ModuleScripts be in ReplicatedStorage?
(Sorry for the late reply)
Yes put them in ReplicatedStorage. If you want you can put them in each button, but ReplicatedStorage is better
Any way to compact this more? Or is this just the only way?
You can use one module script that you can call for ReplicatedStorage.
In the module script make it gets all the buttons and have it check for the buttons. Then use local functions
Ex:
local button = {all you buttons}
local function(action)
if button.mouseclick1 then
--code
end
You will need to get the button when you click it, but put the buttons all in a table and make a function or local function that checks for which button was press
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.