I’m trying to replicate character movement in game to a viewportframe, and I managed to do this, but it does not work with custom armor
how it looks normally without armor (perfectly fine)
how turns out with armor
it should look like this(how it does in game)
it stays welded if I only set the primarypart using SetPrimaryPartCFrame()
poorly made example above
but when I change the CFrame of the limbs the armor does not move with it, like it does in game with animations
this is the code that messes it up
local charc = charfind:GetChildren() -- character clone children
for i, v in pairs(charc) do
sourcesearch.Camera.CFrame = CFrame.new(hrp.Position + hrp.CFrame.LookVector * 6, hrp.Position)
if charc[i]:IsA('BasePart') then
charc[i].CFrame = char[charc[i].Name].CFrame -- char is the actual character the was cloned
elseif charc[i]:IsA('Accessory') then
charc[i].Handle.CFrame = char[charc[i].Name].Handle.CFrame
end
end
I’ve tried googling and tweaking around with the script for hour(s) and I’m really dumbfounded on what’s going on, I don’t believe the problem is with the welds themselves because it works perfectly fine in game, but if you believe the problem is the welds I can include the script for them if anyone asks
The Armor is Welded to fake body parts and then I weld the fake body parts to the characters body part e.g fake arm to arm via script, it works in game I just don’t understand why it does not work with the viewportframe and cframes
Edit: it needs to be this way because I’m going to add more armor, and if I do it your way with offsets they would all have different offsets and would be a lot of work I went this way to reduce work in the long run
Module3D might be outdated, but might work better in his case. Im sure one day the ViewportFrames will be updated to support physics. Im not advising using it. But as for a temporary use, it could and would work. Long term, its not a good thing though.
I was actually making something simular to this for my own game.
What I was planning on doing is having the server send what my character is supposed to look like, and then the client using that information to make a fake character that does local animations.
Apon getting the fake character it creates a character for the viewpointframe.
Basically making the original dummy as a “origin” and the viewpointframe one as a “Copier”
This should fix any weld problems as well, as the replicated parts will just position themselves simular to the origin npc.
Then when that character is made, have that characters descendants copy the origin CFrame wise thus allowing for a hacky animation system to work, Anchoring them and making the origin dummy invisible is probably also a good idea.