Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

1 comment

0

Post your bin script please...

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.