# SpawnLocation(ロブロックス クラス) > プレイヤーが出現(スポーン)する場所になるパーツです。チェックポイントにも使えます。 - URL:https://roblox.minecraft-okinawa.com/reference/classes/SpawnLocation/ - 公式:https://create.roblox.com/docs/reference/engine/classes/SpawnLocation - 受け継いでいるクラス:Part ## 使用例:チェックポイントを作る (Script/置く場所:SpawnLocationの中) ```lua local Players = game:GetService("Players") local checkpoint = script.Parent :: SpawnLocation checkpoint.Touched:Connect(function(hit) local character = hit.Parent if not character or not character:IsA("Model") then return end local player = Players:GetPlayerFromCharacter(character) if player then player.RespawnLocation = checkpoint end end) ``` ## プロパティ - `SpawnLocation.AllowTeamChangeOnTouch: boolean`:Allows a Player to join the team by touching the SpawnLocation. When set to true, if a Player character comes into contact with the SpawnLocation, the player's Player.TeamColor will be set to SpawnLocation.TeamColor. - `SpawnLocation.Duration: int`:出現したあと、守られている(フォースフィールド)秒数。 - `SpawnLocation.Enabled: boolean`:Sets whether or not the SpawnLocation is enabled. When disabled players cannot spawn at the SpawnLocation and the AllowTeamChangeOnTouch functionality is disabled. - `SpawnLocation.Neutral: boolean`:trueにすると、どのチームのプレイヤーもここから出現します。 - `SpawnLocation.TeamColor: BrickColor`:出現できるチームの色。 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)