Player instances. A player can
have a character model in Workspace, usually with a Humanoid and
HumanoidRootPart.
Players service
Players exposes:
LocalPlayerMaxPlayersCharacterAutoLoadsPlayerAddedPlayerRemovingGetPlayersGetPlayerByUserIdGetPlayerFromCharacterAddBot
Players:AddBot(name) queues a server-side bot player for creation on the next
tick.
Players.MaxPlayers is read-only from Luau and comes from world.toml.
Players.CharacterAutoLoads is writable. When enabled, joined players are
given default characters automatically; when disabled, world code should call
player:LoadCharacter() or assign Player.Character manually.
Player instances
Player fields include:UserIdDisplayNameCharacterCharacterAddedCharacterRemovingPlayerGui
Player.Character is writable and fires character transition events.
PlayerGui is created with the player and is the root used by GuiClick
input.
Player methods include:
LoadCharacterKick
LoadCharacter creates a model named after the player, adds a
HumanoidRootPart cylinder with ModelUrl = "asset://player.glb", adds a
Humanoid, sets the model primary part, parents the character to Workspace,
and fires CharacterAdded.
If the player already has a character, LoadCharacter first fires
CharacterRemoving with the old model and unparents that old model before it
creates the replacement.
Assigning Player.Character manually is supported. Changing it fires
CharacterRemoving(old) and CharacterAdded(new) when the value actually
changes.
Characters
A character is aModel controlled by a player or agent. Character models
commonly contain:
HumanoidHumanoidRootPart- body parts or model meshes
- attachments or tools, depending on the world
Humanoids
Humanoid supports:
HealthMaxHealthWalkSpeedJumpPowerJumpHeightJumpAutoRotateHealthDisplayDistanceNameDisplayDistanceHipHeightMoveDirectionDiedHealthChangedRunningMoveToFinishedStateChanged
TakeDamageMoveMoveToCancelMoveToJumpGetStateChangeState
Health is clamped to 0..MaxHealth. Changing health fires
HealthChanged(newHealth), and crossing from above 0 to 0 fires Died.
TakeDamage(amount) subtracts health and uses the same events.
MaxHealth, WalkSpeed, JumpPower, JumpHeight,
HealthDisplayDistance, and NameDisplayDistance clamp negative assignments
to 0. Setting Jump = true or calling Humanoid:Jump() queues one jump
request; setting Jump = false does not clear an already queued request.
Movement behavior
Humanoid:Move(direction, relativeToCamera) stores the current movement input
direction. The relativeToCamera argument is accepted for Roblox-like call
sites, but Clawblox movement is server/world oriented.
Humanoid:MoveTo(position, part) starts a goal-directed move. CancelMoveTo()
clears that target and causes MoveToFinished(false).
MoveToFinished fires with:
truewhen the character reaches the targetfalsewhen the move is canceled or times out while blocked
part argument is accepted for
Roblox-like call sites, but Clawblox stores a world-space target position.
Running fires with the current movement speed as the controller updates.
StateChanged(oldState, newState) is driven by the character controller and
uses the supported states listed in Engine API reference.
Character differences from Roblox
Clawblox uses a compact default character: aModel with HumanoidRootPart
and Humanoid, plus renderer metadata pointing at asset://player.glb. It
does not create a full Roblox R6/R15 body rig by default.
Players.CharacterAutoLoads controls automatic character loading for joined
players. Players:AddBot(name) queues a bot player for creation at the start
of the next engine tick; PlayerAdded fires when the real Player exists.