Skip to main content

WorldPointer

This item only works when running on the client. Client

Guides the player to something in the 3D world.

It draws a beam from the local character to a target part, floats an icon above that target, and can outline a whole model. Each call to WorldPointer:PointTo replaces the previous one, so a step never has to clean up after the step before it.

You normally reach this through PointWorld. Use it directly for guidance that is not tied to a tutorial step, such as a quest marker.

Types

WorldPointerConfig

interface WorldPointerConfig {
Namestring?--

Prefix for the instances it creates. Defaults to "TutorialPointer"

BeamTemplateBeam?--

Your own Beam to clone instead of the built-in one

BeamColorColor3?--

Colour of the built-in beam

BeamWidthnumber?--

Width of the built-in beam. Defaults to 0.16

Iconstring?--

Image floated above the target. No icon without one

IconSizeVector2?--

Icon size in pixels. Defaults to 112 square

IconHeightOffsetnumber?--

Studs above the target. Defaults to 3

OutlineColorColor3?--

Colour of the Highlight

OutlineFillTransparencynumber?--

Fill transparency. Defaults to 0.55

}

Styling. Pass it as Pointer in TutorialConfig.

BeamTemplate is the hook for art that the built-in beam cannot express: a textured beam, a custom curve, a particle-laden one. The kit clones it and only sets the attachments and the name.

Tutorial.build(steps, {
	Pointer = {
		Icon = "rbxassetid://1234567",
		BeamTemplate = ReplicatedStorage.Assets.TutorialBeam,
	},
})

Functions

create

constructor
WorldPointer.create(
configWorldPointerConfig?--

Styling

) → WorldPointer

Creates a standalone pointer. Tutorial.build already does this for you.

Errors

TypeDescription
"TutorialKit.WorldPointer is client only"Called from the server

PointTo

WorldPointer:PointTo(
targetBasePart,--

What to point at

optionsPointOptions?--

Which pieces to draw, and from where

) → ()

Types

interface PointOptions {
FromBasePart?--

Beam origin. Defaults to the local HumanoidRootPart

OutlineInstance?--

Model or part to highlight

Beamboolean?--

Set false to skip the beam

Iconboolean?--

Set false to skip the floating icon

}

Points at a part, replacing whatever was being pointed at before.

pointer:PointTo(questGiver.HumanoidRootPart, { Outline = questGiver })

The beam is skipped when there is no character to start it from, rather than erroring, and it does not retry once the character loads.

Outline

WorldPointer:Outline(
adorneeInstance--

Model or part to highlight

) → ()

Adds a Highlight without touching the beam or the icon.

Unlike WorldPointer:PointTo this one accumulates, so you can outline several things at once. WorldPointer:Clear removes them all.

Clear

WorldPointer:Clear() → ()

Removes the beam, the icon and every outline.

IsActive

WorldPointer:IsActive() → boolean--

Whether anything is currently drawn

Destroy

lifecycle
WorldPointer:Destroy() → ()

Clears everything and stops accepting new calls. Tutorial:Destroy already does this for you.

Show raw api
{
    "functions": [
        {
            "name": "PointTo",
            "desc": "Points at a part, replacing whatever was being pointed at before.\n\n```lua\npointer:PointTo(questGiver.HumanoidRootPart, { Outline = questGiver })\n```\n\nThe beam is skipped when there is no character to start it from, rather than erroring, and it\ndoes not retry once the character loads.",
            "params": [
                {
                    "name": "target",
                    "desc": "What to point at",
                    "lua_type": "BasePart"
                },
                {
                    "name": "options",
                    "desc": "Which pieces to draw, and from where",
                    "lua_type": "PointOptions?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 95,
                "path": "src/Guidance/WorldPointer.luau"
            }
        },
        {
            "name": "Outline",
            "desc": "Adds a `Highlight` without touching the beam or the icon.\n\nUnlike [WorldPointer:PointTo] this one accumulates, so you can outline several things at once.\n[WorldPointer:Clear] removes them all.",
            "params": [
                {
                    "name": "adornee",
                    "desc": "Model or part to highlight",
                    "lua_type": "Instance"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 106,
                "path": "src/Guidance/WorldPointer.luau"
            }
        },
        {
            "name": "Clear",
            "desc": "Removes the beam, the icon and every outline.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 113,
                "path": "src/Guidance/WorldPointer.luau"
            }
        },
        {
            "name": "IsActive",
            "desc": "",
            "params": [],
            "returns": [
                {
                    "desc": "Whether anything is currently drawn",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 119,
                "path": "src/Guidance/WorldPointer.luau"
            }
        },
        {
            "name": "Destroy",
            "desc": "Clears everything and stops accepting new calls. [Tutorial:Destroy] already does this for you.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "tags": [
                "lifecycle"
            ],
            "source": {
                "line": 127,
                "path": "src/Guidance/WorldPointer.luau"
            }
        },
        {
            "name": "create",
            "desc": "Creates a standalone pointer. [Tutorial.build] already does this for you.",
            "params": [
                {
                    "name": "config",
                    "desc": "Styling",
                    "lua_type": "WorldPointerConfig?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "WorldPointer"
                }
            ],
            "function_type": "static",
            "tags": [
                "constructor"
            ],
            "errors": [
                {
                    "lua_type": "\"TutorialKit.WorldPointer is client only\"",
                    "desc": "Called from the server"
                }
            ],
            "source": {
                "line": 170,
                "path": "src/Guidance/WorldPointer.luau"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "WorldPointerConfig",
            "desc": "Styling. Pass it as `Pointer` in [TutorialConfig].\n\n`BeamTemplate` is the hook for art that the built-in beam cannot express: a textured beam, a\ncustom curve, a particle-laden one. The kit clones it and only sets the attachments and the name.\n\n```lua\nTutorial.build(steps, {\n\tPointer = {\n\t\tIcon = \"rbxassetid://1234567\",\n\t\tBeamTemplate = ReplicatedStorage.Assets.TutorialBeam,\n\t},\n})\n```",
            "fields": [
                {
                    "name": "Name",
                    "lua_type": "string?",
                    "desc": "Prefix for the instances it creates. Defaults to \"TutorialPointer\""
                },
                {
                    "name": "BeamTemplate",
                    "lua_type": "Beam?",
                    "desc": "Your own Beam to clone instead of the built-in one"
                },
                {
                    "name": "BeamColor",
                    "lua_type": "Color3?",
                    "desc": "Colour of the built-in beam"
                },
                {
                    "name": "BeamWidth",
                    "lua_type": "number?",
                    "desc": "Width of the built-in beam. Defaults to 0.16"
                },
                {
                    "name": "Icon",
                    "lua_type": "string?",
                    "desc": "Image floated above the target. No icon without one"
                },
                {
                    "name": "IconSize",
                    "lua_type": "Vector2?",
                    "desc": "Icon size in pixels. Defaults to 112 square"
                },
                {
                    "name": "IconHeightOffset",
                    "lua_type": "number?",
                    "desc": "Studs above the target. Defaults to 3"
                },
                {
                    "name": "OutlineColor",
                    "lua_type": "Color3?",
                    "desc": "Colour of the Highlight"
                },
                {
                    "name": "OutlineFillTransparency",
                    "lua_type": "number?",
                    "desc": "Fill transparency. Defaults to 0.55"
                }
            ],
            "source": {
                "line": 53,
                "path": "src/Guidance/WorldPointer.luau"
            }
        },
        {
            "name": "PointOptions",
            "desc": "",
            "fields": [
                {
                    "name": "From",
                    "lua_type": "BasePart?",
                    "desc": "Beam origin. Defaults to the local HumanoidRootPart"
                },
                {
                    "name": "Outline",
                    "lua_type": "Instance?",
                    "desc": "Model or part to highlight"
                },
                {
                    "name": "Beam",
                    "lua_type": "boolean?",
                    "desc": "Set false to skip the beam"
                },
                {
                    "name": "Icon",
                    "lua_type": "boolean?",
                    "desc": "Set false to skip the floating icon"
                }
            ],
            "source": {
                "line": 73,
                "path": "src/Guidance/WorldPointer.luau"
            }
        }
    ],
    "name": "WorldPointer",
    "desc": "Guides the player to something in the 3D world.\n\nIt draws a beam from the local character to a target part, floats an icon above that target, and\ncan outline a whole model. Each call to [WorldPointer:PointTo] replaces the previous one, so a\nstep never has to clean up after the step before it.\n\nYou normally reach this through [PointWorld]. Use it directly for guidance that is not tied to a\ntutorial step, such as a quest marker.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 15,
        "path": "src/Guidance/WorldPointer.luau"
    }
}