Skip to main content
reskate.board reads the local skateboard and changes what is drawn of it. reskate.board.motion needs the skater.read permission; every other function needs the board permission. Calling a function without its permission raises an error. See permissions. A plugin changes only what is drawn. The next animation update writes the whole pose again, and what the plugin asked for is written over it every frame, as the pose goes to the renderer. The board itself, its physics and the skater riding it do not change.
reskate.board sends nothing to other players. set, hide and toss change your own board as your game draws it. park changes every board your game draws, other players’ boards included, but only on your game.

The rig

The board is a rig of 16 bones, numbered 0 to 15. Each bone sits in its parent’s frame. The functions that change bones take 2 to 15. Any other bone number raises an error.

Local and world space

A bone you set is either in "local" space, its own parent’s frame, as the pose holds it and as bones() reads it; or in "world" space, a position and rotation in the world. A world-space bone is written relative to wherever the board’s place (bone 1) is that frame, so it stays put in the world while the board moves. Use world space for a bone that hangs on bone 1.

Reading

reskate.board.motion()

The board’s velocity in the last physics step.
table or nil
nil without a board.
Needs the skater.read permission.

reskate.board.bones()

The local board’s 16 bones as last drawn, each in its parent’s frame.
table or nil
nil without a board. A table indexed 0 to 15 (note the 0: ipairs skips it).
Needs the board permission.

Changing

One plugin holds the local board at a time. The first set, hide or toss takes it; another plugin’s call is refused with "<plugin> holds the board" until the holder clears every bone it set and its tossed piece.

reskate.board.set(bone, pose)

Draws a bone where you say, every frame, until you clear it.
number
required
2 to 15.
table
required
boolean
True when the bone is set.
string
Why not: "<plugin> holds the board" or "a bone's place is finite".
Only the bone’s position and rotation are written; its scale stays as the animation has it.
Needs the board permission.

reskate.board.hide(bone)

Moves a bone out of sight (far below the board), every frame, until you clear it. What hangs on the bone goes with it.
number
required
2 to 15.
boolean
True when the bone is hidden.
string
"<plugin> holds the board" when another plugin has it.
Needs the board permission.

reskate.board.clear(bone)

Gives bones back to the animation.
number
2 to 15: that bone only, set or hidden. Without it: every bone this plugin set or hid, its tossed piece, and its park list.
Returns nothing. Clearing what the plugin does not hold does nothing.
Needs the board permission. When the plugin stops, everything it did to the board is cleared.

reskate.board.park(bones)

Keeps these bones out of sight on every board your game draws, other players’ too. It is meant for a breakable deck’s stretches (12 to 15): the game draws a deck’s layers so that stretches left inside the deck would show through as cracks.
table
required
A list of 0 to 16 bone numbers, each 2 to 15. It replaces this plugin’s list; an empty list {} parks nothing.
Returns nothing. Every plugin has its own list; a bone is parked while any list has it. park does not take the board, so it works while another plugin holds it.
Needs the board permission.

reskate.board.toss(bones, motion)

A piece of the board comes off: these bones leave together from where they are drawn, fly, fall, land flat on the ground height you give, slide a little and lie there until you clear them. The bones should hang on bone 1 (the deck’s mount and what is on it, or a deck’s stretches).
table
required
A list of 1 to 16 bone numbers, each 2 to 15.
table
required
boolean
True when the piece is tossed.
string
Why not: "<plugin> holds the board", "a piece leaves at most 50 m/s, turning at most 50 rad/s" or "asked more than 4 times in a second".
A plugin has one piece at a time: a new toss replaces the last. clear() without a bone takes the piece away.
Needs the board permission (and world.raycast for the example’s raycast). Shares the budget of 4 control calls a second with skater.noclip, boost, freeze, camera.follow, ai.spawn, animation.play and outfit.set.