Say I have a Player and I wanted them to run around in a board and do something when they touch a tile inside the board. Currently my code looks something like this
for _, BodyPart in Character:GetChildren()
if BodyPart:IsA("BasePart") and BodyPart.Name ~= "HumanoidRootPart" then
BodyPart.Touched:Connect(function(OtherPart)
...
end)
end
end
This works perfectly but issue is this stops working when I play an animation on my character, I would assume this has to do with Touched event being physics based. I tried other alternative such as Raycast which solved my issue with the animation at the cost of it being inaccurate.
It's even worse for other alternatives such as Worldroot:GetPartsInPart() and Worldroot:GetPartsInBoundBox() as they're both inaccurate and stops working when run animation is played.
This script is placed inside of a local script, I am aware this is a bad practice but this isn't a concern as of right now.
** You are now Level 10! **