The controller controls the specified entity||doc135626

September 20, 2022

Format

 PlayerControl:attach(entity)

Description

Causes the current player controller to control the specified entity.


Parameters

Variable name type Description
entity Entity specified entity


Code Samples

local entity = EntityClient.CreateClientEntity({cfgName = "myplugin/player1", pos = {x=0,y=3,z=0} })
local control = Blockman.Instance():control()
control:attach(entity)