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

How can I check collection service tag using raycast hitpart?

I'm trying to make a cover system and I have it so that a ray is casting out from the lower torso. Next step is to check if the hit part is tagged as cover. How can I check this? Any help is appreciated.

2 comments

0

Hey Rocket, I personally do not know raycasting yet, but here is a video that may help you with what you need: https://www.youtube.com/watch?v=CPcaJgQkxM8

0

Hey, thanks for the reply. That video doesn't cover how to detect if the hitpart is tagged with a collection service tag, unless I'm mistaken.

1 answer

Figured out myself. If the ray hits something, you do CollectionService:HasTag(hitPart, "Tag"

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