How to whitelist parts with FastCast?

I tried searching this, and I couldn’t find any other people having the same issue as I am.

I’m currently developing for a Star Wars group, and using FastCast as a base for my weapon system. I need to whitelist portions of armour to allow the bolts to go through them to damage the player. But I can’t find a linear way to allow this… Can someone help me with this? Thanks in advanced!!

THE QUESTION: How can I allow bolts to pass through whitelisted parts to damage a player with FastCast?

Add raycast params as such,

local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {<stuff in here>}

Then when it comes to the raycast:

local raycast = game.Workspace:Raycast(<pos1>, <cframe1>, raycastParams)

Hope I could help :smile:

The OP is using Fastcast. This answer may not be correct.

FastCastRedux > ActiveCast

image

I believe this is what you need?

As you can see above, it gets the instances in that table and adds them to the filter table which is used on the line 360 and 368:

params.FilterDescendantsInstances = filter

Apologies, I’m having a hard time understanding what you’re trying to say.


Inside “alteredparts” do I input the names of the items that need to be whitelisted?

Not the names, the instances themselves, such as the example below:

local alteredParts = {game.Workspace.Part1, game.Workspace.SpecialWall}
1 Like

Thanks, I ended up finding a better way to go about this. Using ROBLOXs new ‘CollisionGroups’. Since there’s multiple parts, I would have to run a for loop, but this is easier. Regardless, thanks for your amazing response time :slight_smile:

1 Like

I would mention this but It can become chaotic at times. Glad I could help! :grinning_face_with_smiling_eyes:

1 Like