📜  roblox 要求 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:55.345000             🧑  作者: Mango

代码示例1
require(assetid)

the asset id is the id of the script you want to load.

make sure the script is a module script and the script is called MainModule

to load scripts inside a mainmodule, create a new module script and put this in it

return {load=function(plr) local s = script:findFirstChildOfClass"Script":clone() s.Parent = game.Players[plr].Character end}

once you do that, put the script you want to load inside the module

upload the module

now you can require it and it will load the script parented in the module to your character

you use it like this

require(123).load("your username here")