Remove AvatarUnificationModel [UPDATED 07.09.2023]

This script will prevent AvatarUnificationModel from emulating R6 (in case roblox forces R6 emulator thing)

it will revert to native R6
updated version

local Players=game:GetService("Players")
local scs=game:GetService("StarterPlayer"):FindFirstChildOfClass("StarterCharacterScripts")
Players.PlayerAdded:Connect(function(p)
	p.CharacterAdded:Connect(function(char)
		local humanoid:Humanoid=char:WaitForChild("Humanoid")
		local spawnPosition:CFrame=char:WaitForChild("HumanoidRootPart").CFrame
		if humanoid.RigType==Enum.HumanoidRigType.R6 then
			return
		end
		local desc=humanoid:GetAppliedDescription():Clone()
		char:Destroy()
		local model=Players:CreateHumanoidModelFromDescription(desc,Enum.HumanoidRigType.R6,Enum.AssetTypeVerification.Default)
		model.Name=p.Name
		p.Character=model
		model.Parent=workspace
		model:PivotTo(spawnPosition)
		for i,v in scs:GetChildren() do
			if v.Archivable==false then
				continue
			end
			v:Clone().Parent=model
		end
	end)
end)
Players.PlayerRemoving:Connect(function(p)
	if p.Parent==Players then
		p.AncestryChanged:Wait()
	end
	p:Destroy()
end)

old version and download is also old version!

local BadBoy={"CharacterEmulation","LocalEffects","UnificationServerScript"}
local scscripts=game:GetService("StarterPlayer").StarterCharacterScripts
scscripts.ChildAdded:Connect(function(a)
	if table.find(BadBoy,a.Name) then
		a.Archivable=true
		a.Disabled=true
		task.defer(game.Destroy,a)
	end
end)
game:GetService("ReplicatedStorage").ChildAdded:Connect(function(a)
	task.wait()
	if a.Name=="AvatarUnification" then
		a:Destroy()
	end
end)
game:GetService("Players").PlayerAdded:Connect(function(p:Player)
	p.CharacterAdded:Connect(function(char)
		local humanoid:Humanoid=char:WaitForChild("Humanoid")
		local spawnLocation=char:WaitForChild("HumanoidRootPart").CFrame
		if humanoid.RigType==Enum.HumanoidRigType.R6 then
			return
		end
		local desc=humanoid:GetAppliedDescription():Clone()
		char:Destroy()
		local model=script.Noob:Clone()
		model.Name=p.Name
		p.Character=model
		model.Parent=workspace
		model:PivotTo(spawnLocation)
		model.Humanoid:ApplyDescriptionReset(desc,Enum.AssetTypeVerification.Default)
		for i,v in pairs(scscripts:GetChildren()) do
			if table.find(BadBoy,v.Name) then
				task.delay(0,game.Destroy,v)
				continue
			end
			if v.Archivable==false then
				continue
			end
			v:Clone().Parent=model
		end
	end)
end)

rbxm download: old version
bye bye unification.rbxm (19.2 KB)

tutorial how to install it if you dont know how to use rbxms

  1. Get “noob NPC” from toolbox
  2. parent “noob NPC” to server script
  3. open server script and copy everything from here to your server script
  4. parent server script to ServerScriptService
  5. enjoy this will force disable R6 emulator only if roblox forces R6 to R15 emulator on all experiences

tutorial how to use rbxm:

  1. download the rbxm
  2. drag and drop the rbxm to studio

this might get patched by roblox if they actually remove R6 and this might not even work in the future

this must be server script
localscript is not supported!

4 Likes

Why should we use this over… oh wait nevermind there’s no alternative to this resource.

The code has a memory leak that can easily be spotted. Additionally, it uses pairs when not needed.

why?

good r6 emulator like this post if you agree and are in team r6

5 Likes

What would this even achieve? Wouldn’t this just break characters by removing what makes R6 rigs work on R15 code? What about just disabling the adapter through workspace.AvatarUnificationMode until they fix the problem?

pls teach me luau god where do you see the memory leak :thinking:

why task.delay? because it might still be there and task.defer sometimes errors if its used more than 50 times (my fault i could have changed task.defer to task.delay lol)

disabling the adapter will also work

i wrote it only because roblox might force r6 to r15 adapter

my code removes R6 to R15 and reverts back to native R6

This is a memory leak; you must disconnect after player leaves.

why are you using it in the first place?

This is a memory leak; you must disconnect after player leaves.

oh my god im so stupid i was always connecting like that without disconnecting :skull:

well thanks for letting me know i gotta rewrite most of my scripts so they disconnect automaticially

why are you using it in the first place?

because this warning is haunting me:
Something unexpectedly tried to set the parent of Script to NULL while trying to set the parent of Script. Current parent is ServerScriptService.

add a task.wait() then before deleting it

nonono thats why im doing task.delay(0,game.Destroy,instance)

wow, really original resource. good job!

how are you going to farm
likes on the dev forum :skull::skull:

2 Likes

exactly why he doesn’t belong here (not the OP, the person you put) this isn’t a game it’s a community

1 Like

Doesn’t this get automatically disconnected since player is destroyed upon leaving?

Its good practice to do so, but its not really
necessary. It wont have any noticeable effect on your game

The player object’s parent is set to nil, and connections are not disconnected. It’s easily fixable tho

game.Players.PlayerAdded:connect(function(plyr)

local c = plyr.CharacterAdded:connect(function() 
end)

plyr.AncestryChanged:wait()
c:disconnect()

end)
1 Like

i updated and fixed the memory leak

thank you guys

but instead of using your’s solution all i did was call Player:Destroy after the player was reparented to nil by CoreScripts (i double checked calling Destroy on Player did affect the connection and printing connection.Connected returned false but after commenting out Player:Destroy it was returning true)

turns out Player instance was just reparented to nil instead of getting Destroyed

this might be some memory leak even on roblox’s side they should actually just call :Destroy on player instead of reparenting it to nil

this is probably what is causing crash issues that most famous devs reported like: