Creator Guide
English
English
  • 🚩Introduction to OVERDARE
  • 🐀Get Started
    • OVERDARE App
    • OVERDARE Studio
  • πŸ“ŒPolicy
    • Community Guidelines
    • UGC Creation Guidelines
    • Guidelines on the External Use of UGC
    • Logo Usage Guidelines
    • Intellectual Property Rights Policy
    • Reporting Guidelines
    • Guidelines on Disputing Suspensions and Bans
    • Creator Payout Policy
    • Monetization Guidelines
  • 🏰Studio Manual
    • Studio Interface
    • Asset Import
    • Coordinate System
    • Game Settings
    • Studio Test Play
    • World Publish
    • Collaboration
    • Script Editor
    • Align Tool
    • Animation Editor
    • Material Manager
    • Collision Groups
    • Tag Editor
    • Payout Guideline
    • Object
      • Part
      • Model
      • Character
        • Humanoid Description
      • Camera
      • Physics
      • Lighting
      • Tool
      • VFX
      • Sound
      • GUI
  • πŸ“Script Manual
    • Script Overview
    • Basic Guide to Lua
    • Coding Style
    • Object Reference
    • Event
    • Server-Client Communication
    • BindableEvent
    • Value Objects
    • Mobile Input Handling
    • Tween
    • Breakpoint
    • Module Script
    • TPS Strafing System
    • Saving & Loading Data
    • Unity Developer Guide
  • πŸ“šAPI Reference
    • Enums
      • ActuatorRelativeTo
      • AnimationPriority
      • AspectType
      • AssetTypeVerification
      • BorderMode
      • CameraMode
      • CameraType
      • ContextActionResult
      • CoreGuiType
      • DominantAxis
      • EasingDirection
      • EasingStyle
      • ForceLimitMode
      • HttpCompression
      • HttpContentType
      • HumanoidDisplayDistanceType
      • HumanoidStateType
      • KeyCode
      • Material
      • MaterialPattern
      • NormalId
      • ParticleEmitterShape
      • ParticleEmitterShapeInOut
      • ParticleEmitterShapeStyle
      • ParticleFlipbookLayout
      • ParticleFlipbookMode
      • ParticleOrientation
      • PartType
      • PlaybackState
      • RaycastFilterType
      • RollOffMode
      • RotationType
      • UserInputState
      • UserInputType
      • VelocityConstraintMode
    • DataTypes
      • BlendSpaceSampleSata
      • BrickColor
      • CFrame
      • Color3
      • ColorSequence
      • ColorSequenceKeypoint
      • Content
      • Enum
      • EnumItem
      • NumberRange
      • NumberSequence
      • NumberSequenceKeypoint
      • OverlapParams
      • PhysicalProperties
      • Ray
      • RaycastParams
      • RaycastResult
      • ScriptConnection
      • ScriptSignal
      • TweenInfo
      • Udim
      • Udim2
      • Vector2
      • Vector3
    • Classes
      • Animation
      • AngularVelocity
      • AnimationTrack
      • Animator
      • Atmosphere
      • Attachment
      • Backpack
      • BackpackItem
      • BasePart
      • BaseScript
      • Beam
      • BindableEvent
      • BlendSpace
      • BoolValue
      • Bone
      • Camera
      • CharacterMesh
      • CollectionService
      • Constraint
      • ContextActionService
      • CoreGui
      • DataStore
      • DataModel
      • DataStoreGetOptions
      • DataStoreIncrementOptions
      • DataStoreInfo
      • DataStoreKeyPages
      • DataStoreKeyInfo
      • DataStoreService
      • DataStoreListingPages
      • DataStoreSetOptions
      • FormFactorPart
      • Frame
      • Folder
      • GlobalDataStore
      • GuiBase2d
      • GuiButton
      • GuiObject
      • HttpService
      • Humanoid
      • HumanoidDescription
      • ImageButton
      • ImageLabel
      • InputObject
      • IntValue
      • LayerCollector
      • Instance
      • Light
      • Lighting
      • LinearVelocity
      • LocalScript
      • LuaSourceContainer
      • MaterialService
      • MaterialVariant
      • MeshPart
      • Model
      • ModuleScript
      • Mouse
      • OrderedDataStore
      • Pages
      • Part
      • ParticleEmitter
      • PhysicsService
      • Player
      • PlayerGui
      • Players
      • PlayerScripts
      • PointLight
      • PVInstance
      • ReplicatedStorage
      • RemoteEvent
      • ScreenGui
      • RunService
      • Script
      • ServerStorage
      • ServiceProvider
      • Skeleton
      • ServerScriptService
      • Sound
      • SoundService
      • SoundGroup
      • SpotLight
      • SpawnLocation
      • StarterCharacterScripts
      • StarterPack
      • StarterGui
      • StarterPlayer
      • StarterPlayerScripts
      • StringValue
      • SurfaceGui
      • SurfaceGuiBase
      • Team
      • Teams
      • TextLabel
      • TextButton
      • Tool
      • Trail
      • Tween
      • TweenService
      • TweenBase
      • UIAspectRatioConstraint
      • UserGameSettings
      • UserInputService
      • UserSettings
      • VectorForce
      • Workspace
      • WrapLayer
      • WorldRoot
      • WrapTarget
  • πŸ…°οΈOVERDARE Glossary
  • πŸ“°Release Note
Powered by GitBook
On this page
  • Overview
  • Description
  • Properties
  • Character
  • UserId
  • Team
  • TeamColor
  • RespawnLocation
  • Methods
  • GetMouse
  • LoadCharacter
  • RemoveCharacter
  • Events
  • CharacterAdded
  • CharacterRemoving
  1. API Reference
  2. Classes

Player

Player : Instance

Overview

Player is an instance that encapsulates information about a player who has accessed the world.

Description

The Player class abstracts and manages various details related to the player, including their interactions within the world. It also allows developers to connect event callbacks to handle specific events, such as when a player connects or disconnects from the world. Additionally, each Player instance provides functionality to classify players into groups based on their team color, enabling team-based interactions and management.

Properties

Character

Model

Represents the player's character associated with the player in workspace.

Code Samples

UserId

string

A unique identifier assigned to the player. This ID can be used for tracking, storing, or identifying the player.

Code Samples

Team

Team

Represents the player’s team in the world. The value indicates which team the player belongs to.

Code Samples

TeamColor

BrickColor

TeamColor is a property representing the team color associated with a player in the game.

Code Samples

RespawnLocation

SpawnLocation

Represents the spawn location assigned to the player. This is where the player will respawn upon death.

Code Samples

Methods

GetMouse

Returns the Mouse object associated with the player. This can be used to detect mouse actions and get the position of the mouse within the game world.

Parameters

Return

Mouse

Code Samples

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()

local function OnButton1Down()
    print("Button1Down", Mouse.Target)
end
Mouse.Button1Down:Connect(OnButton1Down)

LoadCharacter

Load the player avatar character.

Parameters

Return

void

Code Samples

player:LoadCharacter()

RemoveCharacter

Remove the player avatar character that is currently imported.

Parameters

Return

void

Code Samples

player:RemoveCharacter()

Events

CharacterAdded

CharacterAdded is an event that fires when a player's avatar character is added to the game world. This can be used to handle initialization or setup tasks specific to the character, such as configuring its appearance, abilities, or assigning team-based properties.

Parameters

Code Samples

local Players = game:GetService("Players") 

local function OnEnterPlayer(player)	
    local function OnCharacterAdded(character)
        print("[OnAddCharacter]", character)	
    end
    player.CharacterAdded:Connect(OnCharacterAdded)	
end
Players.PlayerAdded:Connect(OnEnterPlayer)

CharacterRemoving

CharacterRemoving is an event that fires when a player's avatar character is about to be removed from the game world. This can be used to handle cleanup tasks, save game data, or perform actions such as notifying other parts of the system about the character's removal.

Parameters

Code Samples

local Players = game:GetService("Players") 

local function OnEnterPlayer(player)	
    local function OnCharacterRemoving(character)
        print("[OnCharacterRemoving]", character)	
    end
    player.CharacterRemoving:Connect(OnCharacterRemoving)	
end
Players.PlayerAdded:Connect(OnEnterPlayer)
PreviousPhysicsServiceNextPlayerGui

Last updated 25 days ago

πŸ“š