StarterPlayer
A service which allows the defaults of properties in the Player object to be set. When a player enters the server, each property of the player object is set to the current value of the corresponding property in StarterPlayer.
Additionally, you may add four objects to this service:
- A StarterPlayerScripts instance with scripts that run once for each player.
- A StarterCharacterScripts instance with scripts to add to each player's character every time they spawn.
- A Humanoid instance named StarterHumanoid which will be used as the default humanoid for each player's character.
- A Model instance named StarterCharacter which will be used as the character model for all players.
Summary
Properties
Describes the current game's permission levels regarding custom avatar animations from the website.
Sets whether the character will automatically jump when hitting an obstacle on a mobile device.
The maximum distance the player's default camera is allowed to zoom out in studs.
The minimum distance in studs the player's default camera is allowed to zoom in.
Changes the default camera's mode to either first or third person.
Determines the starting value of Humanoid.JumpHeight for Player.Character.
Determines the starting value of Humanoid.JumpPower for Player.Character.
Determines the starting value of Humanoid.MaxSlopeAngle for Player.Character.
Determines the starting state of Humanoid.UseJumpPower for Player.Character.
Determines the starting value of Humanoid.WalkSpeed for Player.Character.
Sets how the default camera handles objects between the camera and the player.
Lets you overwrite the player's camera mode on a computer.
Lets you overwrite the player's movement mode on a computer.
Lets you overwrite the player's camera mode on a touch-enabled device.
Lets you overwrite the player's movement mode on a touch-enabled device.
Determines if a player can toggle mouse lock by default.
Sets the distance at which this player will see other Humanoid health bars. If set to 0, the health bars will not be displayed.
Whether or not the appearance of a player's character should be loaded.
Indicates whether characters spawning into an experience will have layered clothing accessories equipped on them.
Sets the distance at which this player will see other Humanoid names.
Determines if user-owned emotes are loaded when loading avatars.
Properties
AllowCustomAnimations
AutoJumpEnabled
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local button = script.Parent
local function update()
-- Update button text
if player.AutoJumpEnabled then
button.Text = "Auto-Jump is ON"
else
button.Text = "Auto-Jump is OFF"
end
-- Reflect the property in the player's character, if they have one
if player.Character then
local human = player.Character:FindFirstChild("Humanoid")
if human then
human.AutoJumpEnabled = player.AutoJumpEnabled
end
end
end
local function onActivated()
-- Toggle auto-jump
player.AutoJumpEnabled = not player.AutoJumpEnabled
-- Update everything else
update()
end
button.Activated:Connect(onActivated)
update()
AvatarJointUpgrade
CameraMaxZoomDistance
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
player.CameraMaxZoomDistance = 50
player.CameraMinZoomDistance = 75
CameraMinZoomDistance
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
player.CameraMaxZoomDistance = 50
player.CameraMinZoomDistance = 75
CameraMode
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
player.CameraMode = Enum.CameraMode.LockFirstPerson
CharacterJumpHeight
CharacterJumpPower
CharacterMaxSlopeAngle
CharacterUseJumpPower
CharacterWalkSpeed
ClassicDeath
DevCameraOcclusionMode
DevComputerCameraMovementMode
DevComputerMovementMode
DevTouchCameraMovementMode
DevTouchMovementMode
EnableDynamicHeads
EnableMouseLockOption
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
while true do
player.DevEnableMouseLock = not player.DevEnableMouseLock
task.wait(5)
end
HealthDisplayDistance
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
player.HealthDisplayDistance = 0
player.NameDisplayDistance = 0
LoadCharacterAppearance
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
player.CanLoadCharacterAppearance = false
LoadCharacterLayeredClothing
LuaCharacterController
NameDisplayDistance
Code Samples
local Players = game:GetService("Players")
local player = Players.LocalPlayer
player.HealthDisplayDistance = 0
player.NameDisplayDistance = 0