i want to make a model replicate its animations to a clone, is copying cframes over a good way of doing it and how would i do it? And how would i replicate it to the rest of the model, not just the primarypart
RenderStepped:Connect(function()
ToolEquipped.PrimaryPart.CFrame = ViewModel.ItemHook.CFrame
this doesnt work but its the thing am going for
Its one way.
But iirc, the Motor6Ds
on the rig has a hidden Property called Transform
that allows you to copy it’s CFrame
during the Animation, allowing you to replicate it on (lets say a viewmodel.)
There are probably more efficient ways to doing it that I cant really think off atm.
One way I can think off is copying the id of the animation that its playing, and playing it at a certain timestamp.
Am using transform for the viewmodel rig but how this works is when a tool is equipped it clones it to the viewmodel
i cant finda good way to use transform on the tools because there’s no way to replicate the grip position automatically, i’ve just put a block on the end of the viewmodel arm called Itemhook and running this on renderedstepped
ToolEquipped.PrimaryPart.Position = ViewModel.ItemHook.Position
the animation id thing i might do as last resort but i’d like to find a simple way just copying over the cframes position and rotation
You could try:
for _, instance in pairs(Model:GetDescendants()) do
if instance:IsA(“BasePart”) then
local instanceClone = instance:Clone()
game:GetService(“RunService”).PreRender:Connect(function()
instanceClone.CFrame = instance.CFrame
end)
end
end