So i made an animation that requires the clone of the player to be standing on the floor but wont be able to get moved, and I tried doing it with HumanoidRootPart:MoveTo() because it put the dummy right onto the part,however I now have added a barrier to that place so whenever I try to teleport the dummy it teleports it to the top of the barrier. How would I be able to put the character right on top of a part using CFrame.
(Sorry I forgot to mention but the dummy is anchored and it has to stay that way)
1 Like
local dummyOffset = Vector3.new(0, .5, 0) * dummy:GetExtentsSize().Y -- To calculate dummy model offset we take half of its height
local partOffset = Vector3.new(0, .5, 0) + part.Size.Y -- To calculate part offset we take half of its height
local offset = dummyOffset + partOffset -- And then add it
dummy:PivotTo(Cframe.new(part.Position + offset)) -- Teleport dummy
I hope this helped you.