How to check if a type of object exists?

What function can I use to check if a type of object exists in a especific path? I want to check if something exists regardless of the name of it.

I know this doesn’t work, but how can I do something like this:

if player.Character.HumanoidRootPart:FindFirstChild(Trail) then --Check if a trail object exists regardless the name of it

You can use :FindFirstChildOfClass("Trail")

1 Like