Chickynoid, server authoritative character replacement

With Chickenoid, it sounds like there’s no server-owned humanoid that you could hook up server-side OnTouched events to, right?

Is there a custom character controller instead of humanoid?

I couldn’t understand your question properly, so based on what you said I will give an answer.

Chickynoid does not uses humanoids at all, the humanoid on client side is only used to render the character not any of the physics, it is anchored, there is a hitbox you can use for touched events or use the physics engine from chickynoid to directly detect certain things.

1 Like

How would I change the air movement to be more similar to the default Roblox version?

Right now, with my current settings, jumping makes you retain all horizontal velocity even if you let go of WASD.

In regular Roblox movement, letting go of WASD whilst airborne will stop all horizontal momentum.

How can I replicate this?

I don’t really know, maybe you could make it so your horizontal velocity is decayed when your wishDir is equal to nil, although I think some more work would be required.

I’m not sure why but Chickynoid seems to not apply horizontal velocity when you are on the ground.

I’ve modified the JumpPad resource in order to make a sort of “Dash” for my game, and horizontal velocity only works whilst airborne. I’ve also added upward velocity for testing, and that seems to work just fine.

In the video you can see that while on the ground, I only am launched vertically, but when I am in the air, I’m launched both vertically and horizontally.

I have a feeling this can be attributed to some sort of setting that I’m overlooking, and it’d help tremendously if someone could tell me what I am doing wrong.

This is my code. “direc” is essentially just the move direction. I’ve also tested it with a raw Vector3 value, eg; “Vector3.new(80,0,0)” and it still has the same issue.

simulation.state.vel = cmd.direc*80 + Vector3.new(0,80,0)

Without taking a look at the chickynoid code, I’d guess it’s how the ground friction is done. I remember there being something with that when I looked into a similar issue. Players essentially get slowed to their movement speed limit instantly or near-instant. You’d have to rework that.

How would I reposition a player using this resource?

Like if I wanted to move their Chickynoid Player from one point to another (like a TP pad)

1 Like

you should just be able to call SetPosition on the server.

ServerChickynoid: SetPosition ( position: Vector3 ) → ( )

ServerScriptService/Packages/Chickynoid/Server/ServerChickynoid

1 Like

Call simulation:SetPosition()

or ServerChickynoid

pass true on the teleport argument so the game knows you are attempting to teleport and it does not interpolates the positions.

if you want your teleporter systems to not wait for server’s response to feel smooth, make sure to teleport the player on both his client, and the server.

3 Likes

I’m new to this kind of resource so I’m not sure if this is the right way to do it.

How would I “get” a player’s character from a ServerScript? Assuming I want a Script to teleport somebody, I need their character in order to change state.position.

Chickynoid holds all information inside of tables inside of modules. You access it by requiring the appropriate module, and rummaging around in the tables provided.

2 Likes

You cannot access the player’s character from the server, characters are rendered only on client side, you do not need a player’s character to do so, I already explained how.

To access a player’s record and all their different objects/data, require the “ServerModule” and grab their playerRecord.

local playerRecord = ServerModule:GetPlayerByUserId(ID)

then from there you can access their data, if I am not incorrect you can get their chickynoid and then their simulation to teleport them like this:

local playerRecord = ServerModule:GetPlayerByUserId(MyID)
local chickynoid = playerRecord.chickynoid
local simulation = chickynoid.simulation

simulation:SetPosition(Position, true)

I encourage you to read around the modules and their functions and see what they do, chickynoid isn’t documented, so before I leave, I’ll explain some of the basics.

Simulation
This is the class that takes care of doing the physics work for chickynoids, all the physics are done here along with the math libraries like “CollisionModule”, simulations have a state table, this state table ensures that data inside stays in sync with server and client, whenever the state.pos desyncs it will resync all values inside.

there is also a constants table which contains stuff like movement variables, I suggest reading the “MoveTypeWalking” and “NicerHumanoid” mods to check out how constants are being used.

CharacterData

The characterData objects basically just holds data related to the character itself, it is often used to copy data from simulation.state and other places to be stored here, characterData is sent to all other clients so they can render said data, data sent by characterData is serialized to use less bandwith.

In order to add data to the “serialized” table inside characterData you must set up these steps.

Set your data inside the serialized table

Define the lerp function
image

Add it to the keys table
image

Choose a pack function
image

Add the write function to the SerializeTobitBufferFast function

CharacterModel

The characterModel script is a client only script, it is used by a player’s client to render data from a characterData object replicated to them, characters are not instantly created upon being constructed, make sure to use the FastSignals in them to wait for them properly.

CharacterMods

These scripts are pretty much where you will write any sort of movement code, you can also write other things but this is the most common thing you will write on them.

They have a Start function which runs code upon entering the MoveType, an End function which runs when exiting the MoveType, a function called AlwaysThink which runs at all times regardless if we are on that MoveType, and lastly a Think function which only runs when inside the MoveType.

they work like states on a state machine, I encourage you to read the MoveTypeWalking and MoveTypeFlying scripts for more info.

those are some of the basics.

4 Likes

For anyone curious, chickynoid-to-chickynoid collisions are a possible feature to implement via updating a player’s collision box’s hull whenever the position updates. You can even setup collisions exceptions during sweep and allow specific collisions to(or not to) take place(as I do when NPCs collide with each other).

So far, it’s been working great with no drawback in performance. And yes, I prefer capsule collisions over boxes

Video Showcase

5 Likes

Another reminder that I will need to add another super hard feature to my game :sob:, Ill neglect player collisions for now.

Also that game looks fire.

1 Like

So I’ve been banging my head against a wall for like the past few days trying to figure this out
image
I’m trying to play animations on other channels but for some reason animCounter1 and animNum1 do not replicate to the client, thus the animation doesnt play. Can anyone help me with this?

1 Like

They do not work, chickynoid recieves the replicated data, but the characterModel script ignores all other channels.

I have a fork that fixes that

Enable other animChannel support for Chickynoid - Resources / Community Resources - Developer Forum | Roblox

it just has a small bug ill fix later related to stopping anims

1 Like

Hey! Thank you so much for the reply.
Unfortunately still happening. I have no idea why.

1 Like

If you play an animation from the server on a characterdata, the client who is controlling that characterdata will not get the animation replicated, Only other clients.

Are you sure this is not your issue?

1 Like

Sorry for the late reply!
Seems like you’re right. It only plays on other clients. How can I fix this?

1 Like

It is done like this because the client is supposed to play his own animations on his worldstate, this way when anims play from the server they dont override his.

If the action is completely server sided and theres no way for the client to play his own animation, then i suggest just using a remote event to play the anims on his client.

1 Like