Hi,
I want to check which parts player touching and if its name “something” then it will do a function.
I used .Touching event but this works a bit weird because if for example players idle anim playing arm will go ouside of “something” and then touch and function will play again. Maybe should i use debounce? Just say how i can check what player touching without this weird things with animations
just use :GetTouchingParts in the players model
what do you mean by something? can you give an example?
this might help
function onCharacterAdded(character)
for _,part in pairs(character:GetChildren()) do
if part:IsA("Part") then --check if the object is a part since it might be a humanoid
part.Touched:Connect(function(hit) --apply the touched event on the object
if hit.Name == "OurSomething" then
--do whatever your function is
end
end
end
end