Skip to main content

IKGripUtils

Utility methods for grip attachments

Functions

create

IKGripUtils.create(
binderBinder,
humanoidHumanoid
) → ObjectValue

Parent to the attachment we want the humanoid to grip.

-- Get the binder
local leftGripAttachmentBinder = serviceBag:GetService(require("IKLeftGrip"))

-- Setup sample grip
local attachment = Instance.new("Attachment")
attachment.Parent = workspace.Terrain
attachment.Name = "GripTarget"

-- This will make the NPC try to grip this attachment
local objectValue = IKGripUtils.create(leftGripAttachmentBinder, workspace.NPC.Humanoid)
objectValue.Parent = attachment
Show raw api
{
    "functions": [
        {
            "name": "create",
            "desc": "Parent to the attachment we want the humanoid to grip.\n\n```lua\n-- Get the binder\nlocal leftGripAttachmentBinder = serviceBag:GetService(require(\"IKLeftGrip\"))\n\n-- Setup sample grip\nlocal attachment = Instance.new(\"Attachment\")\nattachment.Parent = workspace.Terrain\nattachment.Name = \"GripTarget\"\n\n-- This will make the NPC try to grip this attachment\nlocal objectValue = IKGripUtils.create(leftGripAttachmentBinder, workspace.NPC.Humanoid)\nobjectValue.Parent = attachment\n```",
            "params": [
                {
                    "name": "binder",
                    "desc": "",
                    "lua_type": "Binder"
                },
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ObjectValue"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 29,
                "path": "src/ik/src/Shared/Grip/IKGripUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "IKGripUtils",
    "desc": "Utility methods for grip attachments",
    "source": {
        "line": 5,
        "path": "src/ik/src/Shared/Grip/IKGripUtils.lua"
    }
}