Workspace and Objects
Making changes to the workspace of the game is essential in order to perform various modifications and add new functionality.
Managing scenes in game
In order to make changes to different levels, scenes, in the game while using the mod framework, it is essential to define in which scene the changes should be made.
To push changes to a scene, you can use the Workspace.Push
function which is already included and bundled in the framework, so you do not have to load any other library, however, we still recommend you to use the Core API to be able to utilize more features.
1.
Scene Name
Define the scene in which changes will be applied.
2.
Changes Applied
Define the changes you want to apply inside the scene.
3.
Run Once
Define if the code will run only once, or if it will run an indefinite number of times.
Creating new objects
Creating objects with the mod framework is simpler than ever, and to do it, simply use the Workspace.CreateObject
function.
1.
Object Name
Defines the type object to create.
2.
Object Position
Define the position of the object, in order, x axis, y axis, and the z axis.
3.
Object Identifier
Define an optional unique object identifier that will be assigned.
Providing an object identifier is essential in order to make changes to that specific object, such as deleting it, changing its size or position and other parameters.
Modifying object parameters
Objects have multiple essential parameters that can be modified, such as its position, size, rotation, and even speed or health in the case of NPCs.
Changing an object's size
To change the size of an object, the Workspace.ModifyObjectSize
function can be used, after the object has been created.
Changing an object's position
To change the position of an existing object, the Workspace.ModifyObjectPosition
function can be used for an object in the current workspace.
Changing an object's rotation
To change the rotation of an object located in the workspace, Workspace.ModifyObjectRotation
can be used.
Last updated