AddCoreScript (Method)

From Legacy Roblox Wiki
Jump to navigationJump to search
Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
AddCoreScript( Integer assetId[, Instance parent = game["Script Context"]], String name )
Returns nil
Description: Makes a CoreScript object inside of parent
Member of: ScriptContext


Example

If using the Command Bar or a CoreScript...

game[ "Script Context" ]:AddCoreScript( 37801172, game.Players, "StarterScript" ) -- creates the desired CoreScript

If using a Script or a LocalScript...

game[ "Script Context" ]:AddCoreScript( 37801172, game.Players, "StarterScript" ) -- s AddCoreScript