skater.read:reskate.skater.get,position,heading,speedandon_ground.skater.teleport:reskate.skater.teleport.events.skater:reskate.skater.state.skater.control:reskate.skater.noclip,boost,freeze,wipeoutandgrind_exit.overlay:reskate.skater.xray.events.tricks:reskate.score.current.trainer:reskate.trainer.set_pointandback.hud:reskate.hud.hideandreskate.hud.corner.
reskate.world.raycast and the rest) see world; for its board, see board.
Positions and headings
A position is a Luauvector in metres, in the world’s frame: y is up. Make one with vector.create(x, y, z). A position you pass must be finite and within 100 km of the map’s centre, or the call raises an error.
A heading is in radians about world up, from -pi to pi. A heading of 0 faces +Z, pi/2 faces +X, and a higher heading is turned to the skater’s left. Teleports take a heading the same way.
Reading the skater
reskate.skater.get()
The local skater as the game has it this tick. Use it when you need more than one value: it reads them all at once.
table or nil
nil when there is no skater (in a menu, during a load).Needs the
skater.read permission.reskate.skater.position()
The skater’s position, or nil without a skater.
vector or nil
Where the skater is.
Needs the
skater.read permission.reskate.skater.heading()
The way the skater faces, or nil without a skater.
number or nil
Radians, -pi to pi.
Needs the
skater.read permission.reskate.skater.speed()
The skater’s speed over the ground, or nil without a skater.
number or nil
Metres per second.
Needs the
skater.read permission.reskate.skater.on_ground()
Whether the skater is on the ground, or nil without a skater.
boolean or nil
False while it is in the air.
Needs the
skater.read permission.reskate.skater.state()
The skater’s physics state, as a name. The skater_state event tells you when it changes (see events).
string or nil
One of
"riding", "air", "wipeout", "grinding", "off_board", "planted", "other" or "none". nil when there is no skater.Needs the
events.skater permission.Moving the skater
reskate.skater.teleport(position, heading)
Moves the skater to position, facing heading. The teleport is sent at once and happens within a few seconds.
vector
required
Where the skater goes. Finite, within 100 km.
number
default:"the skater's heading now"
Radians. Any finite number; it is wrapped into -pi to pi.
boolean
True when the teleport was sent.
string
Why not, when
ok is false: "asked more than twice in a second", "the host has turned teleporting off" or "teleporting is unavailable now (no skater, or a load)".false and why.
Needs the
skater.teleport permission. At most 2 teleports a second, counted together with reskate.trainer.back. In a session whose host has turned teleporting (and noclip) off, every teleport is refused.reskate.skater.noclip(on)
Turns noclip on or off, as the console’s own noclip does: the skater flies through the world.
boolean
required
True for on, false (or nothing) for off.
boolean
True when the change was queued. It takes effect at the game’s next tick.
string
Why not:
"the host has turned noclip off", "asked more than 4 times in a second", or the game’s own reason ("the game is busy; try again").Needs the
skater.control permission. At most 4 calls a second, a budget shared with the plugin’s other control calls (noclip, boost, freeze, camera.follow, ai.spawn, animation.play, board.toss, outfit.set).reskate.skater.boost(kind)
Gives the skater a push, as the console’s boosts do.
string
required
"forward", "up" or "offboard" (up, off the board). Anything else raises an error.boolean
True when the boost was queued.
string
Why not:
"the host has turned boosts off", "asked more than 4 times in a second", or the game’s own reason.Needs the
skater.control permission. Shares the budget of 4 control calls a second (see noclip).reskate.skater.freeze(on)
Holds the skater where it is: noclip with no input, so it hovers in place. The skater stays held while any plugin asks for it, and is let go when the last one stops asking.
boolean
required
True to hold the skater, false (or nothing) to let it go.
boolean
True when this plugin’s ask was taken.
string
Why not:
"the host has turned noclip off", "asked more than 4 times in a second", or the game’s own reason.Needs the
skater.control permission. Shares the budget of 4 control calls a second. When the plugin stops, its hold is let go.reskate.skater.wipeout(force)
Makes the skater bail, as a slam of that force would.
number
default:"2.5"
0.5 to 3. Out of range raises an error.
boolean
True when the wipeout was asked for.
string
Why not:
"one wipeout every 2 s" or "not while a throwdown runs".Needs the
skater.control permission. One wipeout every 2 seconds; a refused call counts too. While No Bail protects the skater, the wipeout is asked for but dropped, as any other wipeout is: ok is still true, and the skater rides on.Grind exits
reskate.skater.grind_exit(wish)
Picks the side the skater pops out of a grind to, whatever the trick and the body’s rotation. The wish stands for every pop out of a grind until you change it. Each pop is told to your plugin as the grind_exit event.
At the pop only the launch’s sideways part, across the rail, is changed: the game’s own sideways speed when it had one (1 metre per second or more), turned to the chosen side, else 1.8 metres per second (the game’s usual), times strength. The speed along the rail, the pop’s height, the trick, the flip and the rotation stay the game’s. A pop slower than 0.5 metres per second along the rail is left alone.
table or nil
required
What the pops do.
nil gives the exits back to the game, while your plugin keeps holding them.boolean
True when your plugin holds the grind exits with this wish.
string
Why not:
"<plugin> picks the grind exits" (another plugin holds them) or "grind exits are unavailable for this game build".side missing or not one of the four, another stance, or a strength out of range raises an error.
Needs the
skater.control permission (and events.skater to hear the grind_exit event). One plugin holds the grind exits at a time: the first to call this, until it stops. Calling with nil does not let go of them. It works in any session; other players see the pop as your skater makes it. reskate.input.hide keeps the triggers you pick with from the game.X-ray
reskate.skater.xray(on)
Keeps the local skater’s x-ray ready for d:skeleton, which draws the game’s own skeleton through the skater. The x-ray is ready while any plugin asks for it. The first time, the skeleton is read in the background, so d:skeleton draws nothing for a moment.
boolean
required
True to keep it ready, false (or nothing) to stop asking.
boolean
True when the ask was taken.
string
"the x-ray is unavailable for this game build" when ok is false.Needs the
overlay permission. While the x-ray is ready ReSkate follows the skater’s rendering every frame, so ask only while you may draw it. When the plugin stops, its ask is dropped.Score
reskate.score.current()
The score HUD as it is now: the line’s score, its multiplier and the trick going on. The trick_started, trick_landed and line_broken events tell you when these change (see events).
table or nil
nil while the game shows no score HUD.Needs the
events.tricks permission.Trainer
A plugin has one save point of its own, kept in memory: it is gone when the plugin reloads. It is separate from the player’s own trainer save points.reskate.trainer.set_point()
Saves where the skater is and the way it faces.
boolean
True when the point was saved.
string
"there is no skater" when ok is false.Needs the
trainer permission.reskate.trainer.back()
Teleports the skater to the plugin’s save point, facing the way it faced there.
boolean
True when the teleport was sent.
string
Why not:
"no save point is set", "asked more than twice in a second", "the host has turned teleporting off" or "teleporting is unavailable now".Needs the
trainer permission (not skater.teleport). At most 2 teleports a second, counted together with reskate.skater.teleport.HUD
reskate.hud.hide(hidden)
Hides the game’s whole HUD, as the hideui console command does. The HUD stays hidden while any plugin asks, and comes back when the last one stops asking. If the player had hidden the HUD already, it stays as the player left it.
True to hide the HUD, false (or nothing) to stop asking.
Needs the
hud permission. When the plugin stops, its ask is dropped.reskate.hud.corner(hidden)
Hides skate.’s HUD in the bottom left corner, for a plugin that shows something of its own there: the d-pad menu, and the score HUD while a line goes on. The rest of the HUD stays. The corner stays hidden while any plugin asks, and comes back when the last one stops asking.
True to hide the corner. False (or nothing) shows it again, and keeps your plugin ready to hide it: a later
true hides it at once.boolean
True.
Needs the
hud permission. When the plugin stops, its ask is dropped and the corner is the game’s again.