Skip to content
Untitled Sandbox - Developer Documentation
docs/types/PrefabSpawnOptions

PrefabSpawnOptions

The settings you pass to world.spawn_prefab to choose where a copy of a prefab goes and what it is called.

Fields

position
vector
Where the prefab's origin goes in the world.
rotation
vector?
How the copy is turned, in degrees on each axis.
parent
The group to put the copy in, which must not be scaled, and nil puts it at the root of the world.
name
string?
The Script Name to give the root of the copy.
tags
{ string }?
A list of tags to put on the root of the copy.
audience
(Player | { Player })?
The only players who see the copy, as one Player or a list of them, and other players are not sent it and walk through it.
↑ ↓ moveEnter openEsc close