Hello,
Recently I have been working on including sprinting into my game and I came upon a helpful debris sprint script, but have encountered a little issue with params
.
For example →
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Whitelist
params.FilterDescendantsInstances = {workspace}
This is the code I am using for the local part of it. Although, it normally works when I use params.FilterDescendantsInstances = {workspace.ACERTAINFOLDER}
.
Now that I am using a HUGE map, and can’t put every part/thing into one folder, i’m curious why params.FilterDescendantsInstances={workspace}
doesn’t just grab all the parts in it?
I tried GetDescentants()
as well, but that seem to not work.
How can I go about this?
For example here is the line of code that does the RayCast →
local rayResult = workspace:Raycast(step.Position + Vector3.new(0,1,0), Vector3.new(0,-3,0), params)
NOTE :
BASICALLY THIS SPRINT SCRIPT NORMALLY LEAVES DEBRIS IF I USE WORKSPACE.FOLDER BUT I JUST WANT IT TO BE CHECKING EVERY PART IN WORKSPACE.