Skip to content

[Smoothie] Eyes

Sh1zok edited this page Apr 25, 2026 · 1 revision

Module purpose

Moves an eye based on the head rotation to look toward where you look

Note

You call this function for each eye, so if you have two eyes you will call this function twice(one for each eye)

Intallation process

To make the eyes turn on the head rotation, 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 eye.
    For example: models.model.root.Head.Eyes.RightEye

  3. Use newEye()
    For example: local rightEye = smoothie:newEye(models.model.root.Head.Eyes.RightEye)

Final example:

local smoothie = require("Smoothie")
local rightEye = smoothie:newEye(models.model.root.Head.Eyes.RightEye)

Settings:

setTopOffsetStrength() Aliases: topOffsetStrength()

The number of pixels that the eye model part will move when the player looks up as far as possible

setTopOffsetStrength()

Parameters:

Name Type Description Default
value number The number of pixels that the eye model part will move when the player looks up 1

Returns:

Type Description
table Returns self for chaining

Example:

rightEye:setTopOffsetStrength(0.5)

setBottomOffsetStrength() Aliases: bottomOffsetStrength()

The number of pixels that the eye model part will move when the player looks down as far as possible

setBottomOffsetStrength()

Parameters:

Name Type Description Default
value number The number of pixels that the eye model part will move when the player looks down 1

Returns:

Type Description
table Returns self for chaining

Example:

rightEye:setBottomOffsetStrength(0.5)

setLeftOffsetStrength() Aliases: leftOffsetStrength()

The number of pixels that the eye model part will move when the player looks left as far as possible

setLeftOffsetStrength()

Parameters:

Name Type Description Default
value number The number of pixels that the eye model part will move when the player looks left 1

Returns:

Type Description
table Returns self for chaining

Example:

rightEye:setLeftOffsetStrength(0.34)

setRightOffsetStrength() Aliases: rightOffsetStrength()

The number of pixels that the eye model part will move when the player looks right as far as possible

setRightOffsetStrength()

Parameters:

Name Type Description Default
value number The number of pixels that the eye model part will move when the player looks right 1

Returns:

Type Description
table Returns self for chaining

Example:

rightEye:setRightOffsetStrength(0.66)

Clone this wiki locally