Set character model scaling||doc135477

September 20, 2022

Format

 Entity:setActorScale(scale) 
  • The class to which the function belongs:Entity

Description

Sets the scale of the solid object Actor.


Parameters

Variable name type Description
scale Vector3 scaling ratio


Code Samples

on the client sideglobal script, when a registered player logs inCallback, which doubles the size of the player character model when logging in

Lib.subscribeEvent(Event.EVENT_PLAYER_LOGIN, function(info)
    local userId = info.userId
    local player = Game.GetPlayerByUserId(userId)
    if player then
        player:setActorScale(Lib.v3(0.5,0.5,0.5))
    end
end