Repository navigation
Releases: superdupernairobi/Noid
Release list
Noid 0.1.0
A humanoid-shaped state machine for custom Roblox character controllers. It just decides what state a character is in and tells you when it changes. It does not move anything or touch the network.
Install
Wally
[dependencies]
Noid = "superdupernairobi/noid@0.1.0"Studio users: download Noid.rbxm below, right-click ReplicatedStorage in the Explorer, and pick Insert > Import Roblox Model
Use
local Noid = require(game:GetService("ReplicatedStorage").Packages.Noid)
local machine = Noid.Machine.new("Idle", "client")
local desired = Noid.Conditions.resolve({ grounded = grounded })
if desired then
machine:Change({ state = desired, source = "sensor" })
end
machine:Changed():Connect(function(old, new)
print(old, "to", new)
end)What's in 0.1.0
Machineis the current state withChange,ChangedandDestroyhooksStatesis a 12-state dictionary similar to theHumanoidStateTypealiasesTransitionsis the thirty-rule table, ex:can(from, to)Conditionsbinds grounded/swimming/climbing/seated/dead to a state, ornilRealmis the client and server to accept different change sourcesSignalandLifecycleare dependencies for cleanup and events
What it isn't
It has no physics, replication, animations, or any of that sort, not even input handling. If you want those handled for you, use the Character Controller Library, it's engine-based and faster than anything written in Luau. Noid is for when you've already built your own controller and just want the states back.
The example in the gif
The thing moving on the screen is a construct, not a controller. It's an anchored part moved by CFrame, with a single Y-axis raycast pointing downward, it has no collision response. That's by design, so the state machine is the POI. You can find the full source at dev/root.client.luau if you're interested.
