Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is the best way to detect Touch between two anchored parts?

Asked by 4 years ago
Edited 4 years ago

I have moving animated models with anchored HumanoidRootPart as primary part, with no "Humanoid, but with AnimationController. It's using TweenService on HumanoidRootPart to move, and models pass a zone, that is an anchored part.

As two anchored parts - zone and HumanoidRootPart - can't fire Touch event, i was hope, that other parts like hands will fire it, but they doesn't.

All parts of the models CanCollide = false (if it's important)

So is there any alternative solutions for how to make it clear to a part, that it touched another part? Or the is there any way to call Touch Event in that case?

Zone = script.Parent

Zone.Upgrade.Touched:Connect(function(Part)
    if Part.ClassName == "MeshPart" and Part.Parent.Name == "Creature" and Part.Parent.Humanoid == false then
        if Zone.Multiplicate.Value then
            Part.CreatureSouls.Value = Part.CreatureSouls.Value * Zone.Souls.Value
        else
            Part.CreatureSouls.Value = Part.CreatureSouls.Value + Zone.Souls.Value
        end
    end
end)
0
Post your bin script please... apexslab 15 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Add me on discord and I can personally help. cass#6295

Ad

Answer this question