Skip to main content

DrawUtil

This was deprecated in This class is currently unsupported.

This item is deprecated. Do not use it for new work.

DrawUtil is a collection of functions that allow you to draw things in the world.

USAGE: Below is some example code that shows how to utilize DrawUtil to draw a vector.

	local DrawUtil = require(game:GetService("ReplicatedStorage").DrawUtil)

	DrawUtil.vector("MyVector", Vector3.new(0, 0, 0), Vector3.new(0, 10, 0), Color3.new(1, 0, 0), 1)

Functions

clearVector

DrawUtil.clearVector(nameThenameofthevectortoclear.) → ()

Clears a vector from the world.

point

DrawUtil.point(
namestring,
positionVector3 | CFrame,
radiusnumber?,
colorColor3?
) → ()

Draws a point in the world.

clearPoint

DrawUtil.clearPoint(nameThenameofthepointtoclear.) → ()

Clears a point from the world.

line

DrawUtil.line(
namestring,
fromVector3,
toVector3,
radiusnumber?,
colorColor3?
) → ()

Draws a line between two points in the world.

clearLine

DrawUtil.clearLine(nameThenameofthelinetoclear.) → ()

Clears a line from the world.

Show raw api
{
    "functions": [
        {
            "name": "clearVector",
            "desc": "Clears a vector from the world.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "The name of the vector to clear."
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 144,
                "path": "src/railutils/src/RailUtil/DrawUtil.lua"
            }
        },
        {
            "name": "point",
            "desc": "Draws a point in the world.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "Vector3 | CFrame"
                },
                {
                    "name": "radius",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "color",
                    "desc": "",
                    "lua_type": "Color3?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 152,
                "path": "src/railutils/src/RailUtil/DrawUtil.lua"
            }
        },
        {
            "name": "clearPoint",
            "desc": "Clears a point from the world.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "The name of the point to clear."
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 188,
                "path": "src/railutils/src/RailUtil/DrawUtil.lua"
            }
        },
        {
            "name": "line",
            "desc": "Draws a line between two points in the world.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "to",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "radius",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "color",
                    "desc": "",
                    "lua_type": "Color3?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 195,
                "path": "src/railutils/src/RailUtil/DrawUtil.lua"
            }
        },
        {
            "name": "clearLine",
            "desc": "Clears a line from the world.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "The name of the line to clear."
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 226,
                "path": "src/railutils/src/RailUtil/DrawUtil.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "DrawUtil",
    "desc": "DrawUtil is a collection of functions that allow you to draw things in the world.\n\nUSAGE:\nBelow is some example code that shows how to utilize DrawUtil to draw a vector.\n```lua\n\tlocal DrawUtil = require(game:GetService(\"ReplicatedStorage\").DrawUtil)\n\n\tDrawUtil.vector(\"MyVector\", Vector3.new(0, 0, 0), Vector3.new(0, 10, 0), Color3.new(1, 0, 0), 1)\n```",
    "deprecated": {
        "version": "This class is currently unsupported.",
        "desc": null
    },
    "source": {
        "line": 18,
        "path": "src/railutils/src/RailUtil/DrawUtil.lua"
    }
}