Skip to content

Arrow

A big arrow that points at one thing: the button a new player should press, a new item in the shop, a door they can walk through. It grows in when it shows, then keeps moving so the eye finds it. Tour points at each step’s target with one.

Arrow exampleArrow example
local arrow = Lucy.Arrow.new({
    direction = "down",
    Position = UDim2.fromOffset(640, 120), -- where the tip goes
    Parent = hud,
})

Its AnchorPoint is its tip, so Position is the spot it points at. Keep a few pixels of gap between the tip and the thing.

Props

PropTypeDefaultState keyWhat it does
directionstring"down"yesdown, up, left or right: the way it points
variantstring"arrow"yesarrow (a shaft and a head), chevron (a bold head) or triangle
motionstring"bounce"yesbounce (back from the tip and in again), pulse (swells in place) or none
sizestring or number"md"yessm (24), md (40), lg (56), or pixels: the arrow’s square
colorstring or Color3"Ring"yesA theme token, such as "Primary", or a Color3. It follows the theme
iconstringyesAn icon name: your own art in place of the shape (below)
visiblebooleantrueyesShows or hides it. Showing it again grows it in again

It also takes the props every component takes.

Methods

MethodWhat it does
arrow:replay()Grows it in again, for when it moves to point at something new
arrow.fade()The transparency it is drawn at now (tracked)

Your own arrow

Pass any icon name your game registered (see Icon). Draw it pointing down; it is turned to direction like the built in shapes, and moves the same way. It keeps the Icon’s colours: register it with tint = false for full colour art.

Lucy.Arrow.new({ icon = "dl:pointer", size = "lg", direction = "left", Parent = hud })

Motion

  • It grows in from its tip with a small overshoot (0.45 s), then bounces or pulses on a 0.8 s beat. Arrow.timing, Arrow.travel (how far a bounce goes, a share of the size) and Arrow.swell (how much a pulse grows) hold these.
  • With reduced motion (see Accessibility) it fades in and keeps still; a pulse becomes a gentle fade in and out.

Look

The shapes are rounded frames in color, so they need no upload and stay sharp at any size. Parts: arrow.body (moves), arrow.scale (its UIScale), arrow.shape (turned to the direction), arrow.parts.arrow, arrow.parts.chevron, arrow.parts.triangle, and arrow.icon once an icon is set. Tags: ui-arrow, ui-arrow-variant-<variant>, ui-arrow-motion-<motion>.

Preview

In Studio, from the command bar: Lucy.Preview.show("Arrow").