ClientRig | Client Side Character Rendering Made Easy

ClientRig is a module that makes rendering character’s bodyparts on the client really easy. It supports R6 rigs and R15. This reduces server strain as less parts will have to be replicated to players along with their physics.

Upon joining the game, the server will clear out all but the necessary parts for the character to stay alive on the server. A snapshot of the character is taken before this happens, so the client can reattach everything after the clearing. Accessories are supported.

It is intended to work with signal behavior set to deferred (the default.)
Players.CharacterAutoLoads must be set to false, the module will warn you if it isn’t.

Obviously this makes big changes to characters, thus breaking roblox’s tools. You’ll have to make your own tool system.

Screenshots

R15, seen on the client

Same character, but from the server.

The module requires Signal, Streamable, and Trove, which are included.

Example Scripts

Client script example usage:

local ReplicatedStorage = game:GetService("ReplicatedStorage");

local ClientRig = require(ReplicatedStorage:WaitForChild("ClientRig"));

ClientRig:CharacterHook(function(Character)
	print(Character.Name, "was just handled by ClientRig");
end)

ClientRig:StreamedOutHook(function(Character)
	print(Character.Name, "just streamed out");
end)

ClientRig:DeathHook(function(Character)
	print(Character.Name, "just died");
end)

ClientRig:Start();

Server script example usage:

local ReplicatedStorage = game:GetService("ReplicatedStorage");

local ServerRig = require(ReplicatedStorage:WaitForChild("ServerRig"));

ServerRig:HookCleared(function(Character)
	print(Character.Name, "was just cleared, ready to be replicated");
end)

ServerRig:HookDeath(function(Character)
	print(Character.Name, "just died");
end)

ServerRig:HookPreCleared(function(Character)
	print(Character.Name, "is about to be cleared");
end)

ServerRig:HookPreLoad(function(Character)
	print(Character.Name, "just joined the game");
end)

ServerRig:Start();

Download
ClientRig.rbxm (20.1 KB)

Updates
Version 2 is in the works, which will feature safer and more simplified code, along with support for custom rigs! (I don’t think this would work with bones)

10 Likes