No edit summary Tag: sourceedit |
Nollislide (talk | contribs) m (→{{property|name=AllowTeamChangeOnTouch|type=bool}}: fix weird typo) |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Infobox class |
||
− | [[File:Spawn.png|thumb|220px|Spawn texture.]]A [[SpawnLocation]] is a [[BasePart]] that will act as a location where the players will spawn. |
||
+ | | explorer order = 3}} |
||
+ | The '''SpawnLocation''' [[class]] [[inherit]]s from [[Class:Part|Part]]. |
||
+ | == Properties == |
||
− | If no other actions is taken, a [[Player (Instance)|player]] will spawn on a random ''SpawnLocation ''that have the setting Neutral set to ''true''. If the player is in a [[team]], the player will spawn on a random ''SpawnLocation ''with the same team color. |
||
− | If the Players.AutoSpawn setting is ''false'' then players won't spawn automatically, but a call to: |
||
− | {{code|=Player:LoadCharacter()}} |
||
+ | === {{property|name=AllowTeamChangeOnTouch|type=bool}} === |
||
− | Will make the player spawn on a random spawn as described before (this code can also be used even if the AutoSpawn is true). |
||
+ | If set to true, {{Class link|Player}}s who touch this spawn will automatically change to the {{Class link|Team}} that has this spawn's [[#TeamColor|TeamColor]]. |
||
− | With the [[Teleporters|teleportation]] you can make a player spawn on a specific spawn in another game. This spawn is targeted by using the spawn's name in the teleportation code. The targeted spawn must have the Neutral value set to ''true ''though. |
||
+ | === {{property|name=Duration|type=int}} === |
||
− | The first SpawnLocation was created by RobloxPolice. |
||
+ | |||
− | == Glitches == |
||
+ | The amount of time that a {{Class link|ForceField}} will stay on a player after spawning at this spawn. Set to 0 for no forcefield. |
||
− | * Sometimes, when spawning, the player's torso might freeze. This causes their character to not move and creates a slipping noise. |
||
+ | |||
− | [[Category:Classes]] |
||
+ | === {{property|name=Enabled|type=bool}} === |
||
− | [[Category:Game development]] |
||
+ | |||
+ | Whether or not {{Class link|Player}}s can spawn at this spawn. |
||
+ | |||
+ | === {{property|name=Neutral|type=bool}} === |
||
+ | |||
+ | If set to true, this spawn belongs to no team and any team can spawn here. |
||
+ | |||
+ | === {{property|name=TeamColor|type=BrickColor}} === |
||
+ | |||
+ | The team this spawn belongs to. Corresponds with a TeamColor of a {{Class link|Team}} in the {{Class link|Teams}} service. |
||
+ | |||
+ | == External links == |
||
+ | |||
+ | * {{DevHub class link}} |
||
+ | * {{Roblox API Reference class link}} |
Revision as of 07:27, 9 April 2020
The SpawnLocation class inherits from Part.
Properties
AllowTeamChangeOnTouch: bool
If set to true, Players who touch this spawn will automatically change to the Team that has this spawn's TeamColor.
Duration: int
The amount of time that a ForceField will stay on a player after spawning at this spawn. Set to 0 for no forcefield.
Enabled: bool
Whether or not Players can spawn at this spawn.
Neutral: bool
If set to true, this spawn belongs to no team and any team can spawn here.
TeamColor: BrickColor
The team this spawn belongs to. Corresponds with a TeamColor of a Team in the Teams service.