Custom character controllers and physics

How characters really move on Roblox, from the Humanoid to physics controllers, the Character Controller Library and Server Authority, and how Beacon Yard checks moves on the server.

Concept lesson, about 85 minutes, 12 steps

By the end you can

  • Explain who simulates a Roblox character by default and why that lets clients cheat movement
  • Compare the Humanoid, ControllerManager physics controllers, the Character Controller Library and Server Authority
  • Drive an object with mover constraints and see how network ownership decides whose input counts
  • Write a server-side sanity check for reported movement, using Beacon Yard's real walk speeds

Before this: Security: never trust the client, Physics: constraints, assemblies, network ownership

Step 1 of 12

Who moves your character?

Buy Speed in Beacon Yard's shop and you run at 24 studs a second instead of 16. The server makes that change, in DataService:

function DataService.applySpeed(player: Player)
	local profile = profiles[player]
	local character = player.Character
	if not profile or not character then
		return
	end
	local humanoid = character:FindFirstChildOfClass("Humanoid")
	if not humanoid then
		return
	end
	humanoid.WalkSpeed = if profile.speedOwned then Config.BOOST_SPEED else Config.WALK_SPEED

So the server sets the speed. But when you press W, your own device moves your character, frame by frame, and sends the result up. By default the clientClientOne player's device running its own copy of the game for display and input.Think of it as your screen and controller at home. simulates its own character: it holds the ball, in network-ownership terms1. That is why walking feels instant even on a slow connection, and it is the root of every speed hack.

Choose one

In stock Beacon Yard, a player with Speed walks across the yard. Which machine works out where their character is each frame?

In stock Beacon Yard, a player with Speed walks across the yard. Which machine works out where their character is each frame?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 2 of 12

What the Humanoid does for you

The Humanoid

A Humanoid is the engine object that turns a model into a character2. It reads input direction, walks, jumps, climbs ladders, swims, falls over and gets up, through a fixed set of states (Enum.HumanoidStateType). It also holds health, applies avatar clothing and accessories, and plays the default animations. You tune it with properties such as WalkSpeed and JumpHeight; you cannot change the state machine inside it.

For most games this is exactly right. Beacon Yard uses the stock Humanoid and changes only WalkSpeed. Teams leave the Humanoid when they need movement it cannot do (wall-running, momentum skating, a vehicle that is also a character), or when they need movement the server can verify.

Choose all that apply

Which of these are good reasons to replace the default Humanoid movement?

Which of these are good reasons to replace the default Humanoid movement?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 3 of 12

The controller picture breaks

Client sideRemember: The client is your screen and controller at home.

Players picture their device as a screen and a controller, with the game somewhere else. For their own character, that picture is wrong. Answer before you open the breakdown.

Where does it break?“Your screen and controller at home” is a good picture of the client. Where does it stop being true?

It breaks here. The client also simulates your own character's movement and sends it up, so it is more than a screen.

The true model. Each player's device runs its own copy of the game for display and input. It owns its character's physics by default, which is why movement feels instant and why a cheater can move strangely.

Choose one

An exploiter sets their own Humanoid's WalkSpeed to 100 on their client in stock Beacon Yard. What do other players see?

An exploiter sets their own Humanoid's WalkSpeed to 100 on their client in stock Beacon Yard. What do other players see?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 4 of 12

What Beacon Yard checks instead

Beacon Yard never trusts a position for anything that pays out. A coin pays only when the server measures the character close enough, whatever the client says about touching it:

		-- A touch is only a hint. Check the character's root is close
		-- enough to the coin before paying.
		local character = player.Character
		local rootPart = if character then character:FindFirstChild("HumanoidRootPart") else nil
		if rootPart == nil or not rootPart:IsA("BasePart") then
			return
		end
		if (rootPart.Position - coin.Position).Magnitude > 12 then

That stops "collect every coin from across the map". It does not stop a fast runner from reaching coins sooner. To catch that, the server has to look at movement itself: sample each root part's position, and ask whether the distance since the last sample was possible at that player's speed. Before pressing Run, predict which of the four cases below returns false, and notice why the fourth case is a false positive.

Luau with roblox-lite (not Roblox)
Ctrl Enter runs the cell. Checked against the expected output
Choose one

The last line prints false for an honest player falling off a crate. What is wrong with the check?

The last line prints false for an honest player falling off a crate. What is wrong with the check?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 5 of 12

Physics controllers: ControllerManager

Under the Humanoid, Roblox has a lower-level, scriptable system. A ControllerManager drives a character's root part with physics, and you give it controllers for each kind of movement: GroundController, AirController, ClimbController and SwimController3. Sensors (ControllerPartSensor) report the floor or a climbable surface under the character. Your script picks the active controller and sets MovingDirection and FacingDirection; the controllers apply forces to reach them.

Because the movement is ordinary physics, it interacts properly with moving platforms, slopes and pushes, and you can tune acceleration and friction per controller. The cost: you write the state logic the Humanoid used to give you, and you test it on every device.

Match the pairs

Match each piece to its job.

Link to this step · This confused me

Step 6 of 12

The Character Controller Library

In April 2026 Roblox released the Character Controller LibraryCharacter Controller LibraryRoblox's Luau character movement built from abilities on top of ControllerManager.Think of it as the Humanoid's state machine, taken apart into pieces you can read and replace. (CCL) for live games: a Luau implementation of character movement, built on ControllerManager, that you switch on in Avatar Settings > Movement instead of the legacy Humanoid movement4. Movement is a set of abilities (running, jumping, climbing) that declare when they start and what they block, coordinated through labels5.

Three cautions, checked on 2026-11-25. The docs page now opens with a beta notice, "The CCL is currently in beta", and asks you to turn on the AvatarAbilities Character Controller Library beta feature first, even though the April post called the library a full release5. The custom abilities API arrived as a Studio beta, and its 5 November 2026 update renamed functions and fields, so code written against older posts breaks6. And ability callbacks run in both a predicted client simulation and the authoritative server simulation, so they must be deterministic.

Roblox Studio
Roblox Studio's Avatar Settings window on the Movement tab, with Character Controller Library selected and the list of default abilities checked.

Select a numbered pin, or a row below, to read what it marks.

Avatar Settings, Movement tab. The pins mark the Humanoid or Character Controller Library choice and the default abilities.

Choose one

A teammate pastes a custom CCL ability from a forum post written in September 2026, and it errors. What is the most likely reason?

A teammate pastes a custom CCL ability from a forum post written in September 2026, and it errors. What is the most likely reason?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 7 of 12

Moving with constraints

You do not need a character to learn the physics underneath. Mover constraints push parts toward a goal: LinearVelocity holds a velocity, AlignOrientation turns a part toward an orientation7. A yard cart is a good test bed, and it shows exactly how ownership decides whose input counts.

Build along

m06-drone-wrench

  1. In a new Baseplate place (not the Beacon Yard project), add a part named Cart, size 4, 2, 6, unanchored, with an Attachment at its centre.

    You should see A 4 x 2 x 6 unanchored part sits on the baseplate of a new test place.

  2. Add a LinearVelocity (Attachment0 = the attachment, VelocityConstraintMode Vector, RelativeTo World, VectorVelocity 0, 0, 0) and an AlignOrientation (Attachment0 = the attachment, Mode OneAttachment, Responsiveness 20).

    You should see In Play, the cart holds still on flat ground and turns to face -Z (the front of CFrame.identity).

  3. Add a server Script that calls Cart:SetNetworkOwner(player) for the first player who joins, and a LocalScript that sets VectorVelocity from the keys every frame.

    You should see On Play, holding W in the client moves the cart, and a second player in a two-player test sees it move.

  4. Change the server script to Cart:SetNetworkOwner(nil) and play again.

    You should see Holding W now does nothing: the client's change to VectorVelocity never reaches the server, which owns the cart.

Choose one

To drive a server-owned cart from player input, what do you send to the server?

To drive a server-owned cart from player input, what do you send to the server?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 8 of 12

Server Authority: prediction and rollback

In July 2026 Roblox released Server AuthorityServer AuthorityEngine netcode where the server runs the real simulation and clients predict and roll back.Think of it as the referee plays the match; your controller only sends button presses, and your screen guesses ahead. to every creator8. With Workspace.AuthorityMode set to Server, the server runs the real simulation and clients send only their inputs. Each client predicts a few frames ahead so input still feels instant, then rolls back and resimulates when the server's state disagrees9. Setting the mode turns on what it needs: next-generation replication, the Input Action System, deferred signals, fixed-step simulation and streaming.

Your movement code goes in functions bound with RunService:BindToSimulation() in a module both sides run, reading time(), which rewinds during resimulation. tick() and os.time() do not rewind, so they cannot drive simulated state. This step introduces how custom controllers plug into Server Authority; Module 13's Server authority: prediction, rollback, lag-compensated hits teaches prediction, lag rewind and misprediction recovery in full depth with an interactive simulator.

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
Humanoid (default)Engine character with a fixed state machine.Most games, including Beacon Yard. Tune WalkSpeed and JumpHeight, check what matters on the server.Client-simulated; custom movement means fighting the state machine.
ControllerManagerPhysics controllers you drive from Luau.Custom movement that should still be physical: slopes, platforms, momentum.You write the state logic and test it everywhere.
Character Controller LibraryRoblox's Luau character built on ControllerManager, with abilities.New games that want Humanoid-like defaults plus custom abilities, and that plan for Server Authority.Its docs page carries a beta notice, and the custom abilities API still renames things.
Server AuthorityEngine netcode: server-run simulation with client prediction and rollback.Competitive games where movement cheats must be impossible.Deterministic code, extra setup, and visible corrections when prediction misses.
ChickynoidCommunity server-authoritative character controller, MIT.Older competitive projects built before Server Authority existed.Its repository's last push was in May 2024; prefer the engine feature for new work.
Choose one

Inside a function bound with BindToSimulation, which clock should drive a moving platform?

Inside a function bound with BindToSimulation, which clock should drive a moving platform?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 9 of 12

Try it: the cart under Server Authority

Back to the yard cart. With plain server ownership, the client's key press had to travel to the server before the cart moved. Under Server Authority the cart stays server-owned, input travels as an input action, and the client can predict the result. The docs set three rules for this: input that affects the simulation goes through the Input Action System, an InputContext must sit under a Player, and movement code runs in a function bound with RunService:BindToSimulation() in a module both sides run9.

luau
-- ModuleScript CartSim in ReplicatedStorage. Both sides run it.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
 
local CartSim = {}
 
local function anyoneDriving(): boolean
	for _, player in Players:GetPlayers() do
		local inputs = player:FindFirstChild("Inputs")
		local context = inputs and inputs:FindFirstChild("CartContext")
		local drive = context and context:FindFirstChild("Drive")
		if drive and drive:GetState() == true then
			return true
		end
	end
	return false
end
 
function CartSim.Initialize()
	local cart = workspace:WaitForChild("Cart")
	local velocity = cart:WaitForChild("LinearVelocity") :: LinearVelocity
	RunService:BindToSimulation(function()
		velocity.VectorVelocity = if anyoneDriving() then Vector3.new(0, 0, -16) else Vector3.zero
	end)
end
 
return CartSim

Inside the bound function only properties and methods marked Simulation Access may be used. LinearVelocity.VectorVelocity, FindFirstChild and InputAction:GetState() all are. Prediction can be forced per instance from the client with RunService:SetPredictionMode().

Build along

m06-drone-wrench

  1. Save your cart place under a new name, delete its network-owner Script and its LocalScript, and set Workspace > AuthorityMode to Server.

    You should see A copy of the cart place is open. Workspace.AuthorityMode reads Server, and NextGenerationReplication, PlayerScriptsUseInputActionSystem, SignalBehavior Deferred, UseFixedSimulation and StreamingEnabled are set with it.

  2. Build the input: a Folder Inputs in ReplicatedStorage, an InputContext named CartContext inside it, an InputAction named Drive (Type Bool) inside that, and an InputBinding with KeyCode W inside the action.

    You should see ReplicatedStorage holds a folder Inputs with an InputContext CartContext, an InputAction Drive of Type Bool, and an InputBinding with KeyCode W under it.

  3. Add the docs' InputSetup Script to ServerScriptService: it clones ReplicatedStorage.Inputs into every player on PlayerAdded, and into players already in the game.

    You should see Each player who joins gets a copy of Inputs under their Player object.

  4. Add the CartSim module above to ReplicatedStorage, then a Script in ServerScriptService and a LocalScript in StarterPlayerScripts that each run require(game.ReplicatedStorage.CartSim).Initialize(). Press Play.

    You should see Holding W drives the cart forward and releasing it stops the cart, while the cart stays owned by the server.

  5. Apply the Bad Connection (3G) network preset from Mobile: streaming, memory and draw budgets. Add a LocalScript that calls game:GetService("RunService"):SetPredictionMode(workspace:WaitForChild("Cart"), Enum.PredictionMode.On), drive, then change On to Off and drive again.

    You should see With prediction On the cart answers W at once and sometimes snaps when the server corrects it. With prediction Off it starts and stops a moment after the key, by about the round trip.

Predict the output

Under Server Authority with 3G lag, you set the cart's prediction mode to Off and hold W. What do you see?

Under Server Authority with 3G lag, you set the cart's prediction mode to Off and hold W. What do you see?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 10 of 12

How studios choose

Choose one

Your Beacon Yard move check fails once for a player on a mobile connection. What should the server do?

Your Beacon Yard move check fails once for a player on a mobile connection. What should the server do?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 11 of 12

Challenges

Level 1, Apprentice

Challenge

Try the Character Controller Library in a scratch place. Do not switch Beacon Yard itself.

Start from
A new Baseplate place in Studio

Done means

  • Avatar Settings is switched to the Character Controller Library
  • You played and compared walking, jumping and climbing a truss with the legacy Humanoid
  • You listed one difference you noticed and one ability you could turn off

Meet the criteria above, then record your own result. No test grades this check.

Level 2, Builder

Challenge

Turn the cart into a server-owned vehicle that trusts only validated, clamped input: finite numbers first, then the clamp.

Start from
The cart from the build-along

Done means

  • The server owns the cart
  • A LocalScript sends throttle and steering through a RemoteEvent at most 20 times a second
  • The server ignores any value that is not a finite number (NaN, infinity or a non-number), then clamps both to -1 to 1 before it sets VectorVelocity and the AlignOrientation goal
  • A forged throttle of 50 moves the cart no faster than a throttle of 1, and a forged NaN leaves the cart as it was

Meet the criteria above, then record your own result. No test grades this check.

Work it out

In the move check, which walkSpeed should the server pass for a player whose profile has speedOwned = true? Give the Config value.

studs per second

Level 3, Professional

Challenge

Start from the m14-ship tag in the game repo, then fix the stock move check so an honest fall and a little jitter pass while speed hacks and teleports fail. The test uses Config.WALK_SPEED and Config.BOOST_SPEED. Run it with game.ServerScriptService.RunGameTests:Invoke("custom-character-controllers").

Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("custom-character-controllers") in the server command bar. Copy the pass code from Output.

Done means

  • challenges/work/move_check.luau measures horizontal distance only
  • It allows walkSpeed * dt * 1.25 plus 2 studs of slack
  • It rejects NaN and infinite positions
  • The custom-character-controllers challenge prints TEST PASS for all eight checks

The Course Runner prints this code when the test passes.

Choose one

Once the move check passes, which cheat can it still miss?

Once the move check passes, which cheat can it still miss?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 12 of 12

Recap

Retiring the analogy

You no longer need “your screen and controller at home”. Each player's device runs its own copy of the game for display and input. It owns its character's physics by default, which is why movement feels instant and why a cheater can move strangely.

Recap

  1. By default each client simulates its own character, so movement feels instant and can be cheated; Beacon Yard checks what pays out on the server.
  2. Humanoid, ControllerManager, the Character Controller Library (its docs marked beta, custom abilities renamed in November) and Server Authority are steps from engine-made to fully server-verified movement.
  3. Mover constraints plus network ownership decide whose input moves a part; send input, not positions, to anything the server owns.

The client is your screen and controller at home, until the client also simulates your own character's movement and sends it up, so it is more than a screen.

Next Open Cloud automation: APIs, webhooks, data tools

Link to this step · This confused me