Replicating Character to Hologram

Hello, I’m currently trying to replicate the characters, movement&animations to a hologram that can be displayed.

I thought about moving a cloned HumanoidRootPart Position to where the player is standing but after further inspecting and tinkering this does not handle Rotation, Animations and a-lot of other things that happen normally while playing games.

Here’s a example of what I’m trying to recreate.
Example:

3 Likes

Greetings, I had to do something of this nature in the past and what I did was loop through each part in the character.

function renderCharacter(v)
	local pos = v.Position + Vector3.new(0,0,distanceMul)
	local orn = v.Orientation
	task.wait(0.07)
	dummy:FindFirstChild(tostring(v)).Position =  pos
	dummy:FindFirstChild(tostring(v)).Orientation =  orn
end

game:GetService("RunService").Heartbeat:Connect(function()
RunService.Heartbeat:Connect(function()
	if character and dummy then
		for i,v in pairs(character:GetChildren()) do
			if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then -- These checks aren't needed, but incase something happens.
				coroutine.wrap(renderCharacter)(v)
			end
		end
	end
end)
end)

My code may not be universal for all applications, but if you need help porting it or anything else, I am here to help! If this produces an error, please let me know I can fix it, and as always; happy scripting!
3 Likes

Hello!
Thanks for you’re response :stuck_out_tongue:
I would like to ask a couple question,
What should distanceMul, character, dummy be?
I’m assuming Character would be LocalPlayer character.
I’m assuming dummy would be the Model of the dummy.
distanceMul not sure.

3 Likes

distanceMul is a setback on how far it was from the character, in this use case it is not needed so you may delete the variable and replace it with 0.

Everything else is correct!

Edit: The task.wait() can be changed to minimize/maximize movement delay. If you want your dummy to react slower, change the time to be higher, I recommend no more than 0.3 seconds!

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.