Hello my Name is CuriousMrmonkey and I have recently been having trouble with the hitbox of rigged meshes.
What I want to Achieve - I want to update the hitbox of the mesh with the animation.
What I have tried;
I made two scripts based off of other topics solutions. And has ended up in two different ways. In the 1st script which is a local script. The character teleports in two different directions back and fourth at instant speed. It makes it look like all the objects have doubled. I have also tried modifying ROBLOX’s VFX position updater and resulted and turning the player invisible. Its located in this forum → Custom Characters
Video for local script →
Local Script;
local render = game:GetService("RunService")
local mesh = script.Parent:WaitForChild("HumanoidRootPart")
local table = {}
render.RenderStepped:Connect(function()
for i,v in pairs(mesh:GetDescendants()) do
if v:IsA("Bone") then
table = v.TransformedWorldCFrame
mesh.CFrame = table
end
end
end)
And the server script just throws the player off the map.
Server Script;
local render = game:GetService("RunService")
local mesh = script.Parent:WaitForChild("HumanoidRootPart")
game:GetService("RunService").Heartbeat:Connect(function()
for i,v in pairs(mesh:GetDescendants()) do
if v:IsA("Bone") then
local Bone = v
mesh.CFrame = Bone.TransformedWorldCFrame
end
end
end)
Thanks for reading