Skip to content

[Smoothie] Smooth Head

Sh1zok edited this page Apr 25, 2026 · 1 revision

Module purpose

Usually the head always looks where the player is looking. By using this you can make the turning process smoother. You can also change the rotation strenght and head tilt for a more realistic head turn.

Intallation process

To make the head turn smoother, do the following:

  1. Initialize Smoothie and store it in a variable.
    For example: local smoothie = require("Smoothie")

  2. Copy the path to the model part that is the head.
    For example: models.model.root.Head

  3. Use newSmoothHead()
    For example: local smoothHead = smoothie:newSmoothHead(models.model.root.Head)

Final example:

local smoothie = require("Smoothie")
local smoothHead = smoothie:newSmoothHead(models.model.root.Head)

Settings:

setStrength() Aliases: strenghth()

Sets the head rotation strength

setStrength()

Parameters:

Name Type Description Default
value number The head rotation strength 1

Returns:

Type Description
table Returns self for chaining

Example:

smooothHead:setStrength(0.75) -- Now the head will not turn all the way

setSpeed() Aliases: speed()

Sets the head rotation speed

setSpeed()

Parameters:

Name Type Description Default
value number The speed at which the head will turn 1

Returns:

Type Description
table Returns self for chaining

Example:

smooothHead:setSpeed(2) -- Now the head will turn twice as fast

setTiltMultiplier() Aliases: tiltMultiplier()

Sets the head tilt multiplier

setTiltMultiplier()

Parameters:

Name Type Description Default
value number The head tilt multiplier 1

Returns:

Type Description
table Returns self for chaining

Example:

smooothHead:setTiltMultiplier(3)

setKeepVanillaPosition() Aliases: keepVanillaPosition()

When you create a new smooth head, the model part that you give as a parameter loses its parent type, and with it the movement of the model part when you crouching and in other poses.

setKeepVanillaPosition()

Parameters:

Name Type Description Default
state Boolean The speed at which the head will turn true

Returns:

Type Description
table Returns self for chaining

Example:

smooothHead:setKeepVanillaPosition(false) -- Don't crouch, or you'll rip your head off

Clone this wiki locally