I want the raytracing of the endorsed weapon kit to go trough a solid block

I am currently using the endorsed weapon kit. But I made a fence part and I need all of the weapons to shoot through it. Yet, I don’t want any parts/players to be able to run through it.

Bullets are not going through it and are hitting the fence as if it was a normal surface

I tried looking into collision ID but I have no idea where to put my head and I can’t find anything like this on the forums. Does anyone have a solution?

I am basically making a zombie game in which players are behind a fence and are shooting at the zombies. My fence is a part with transparent textures on each side:
image

1 Like

Just change the raycastParams that the weapon uses to blacklist the fence.

Would you happen to know where its located in the endorsed weapon kit?

I don’t know which endorsed weapon kit you’re talking about, but you can use control+shift+f to search all scripts for a keyword like RaycastParams.new or :Raycast. If you need help with this then send me the model.

The weapon kit does not use raycasts.

Ive checked all of the scripts and it seems that one called BulletWeapon is responsible for tracking the bullets path. There is also a table called self.ignoreList at line 81 but I am unable to add any instances to it. It looks like it has not been made to manually add stuff in since it apparently keeps refreshing it.

[I STILL NEED HELP IF ANYONE HAS A SOLUTION]

I could probably help you rewrite the ignore list if you give me a link to the kit, as I have absolutely no idea what the kit is or where to find it.

image
We have to put the weaponsystem folder in serverscriptservice. Its the manager of all weapons.
And inside that folder contains all the scripts including one called bulletweapon which checks the bullet path. Problem is, I cant find where I could add a filter for the parabola the weapon casts to create the bullet path.

Here is the weapon itself which is dependent of the weaponsSystem folder:
image

On line 246 of modulescript bulletWeapon there is a function used for getting the ignore list. By modifying that function you can change the ignore list to always ignore certain parts.
Here is an example of what I would replace the function with:

local myEpicIgnoreList = {game.Workspace.VeryCoolWall, game.Workspace.UnhittableFolder} -- anything that is in this table or is a descendant of anything in this table (meaning folders work) will be ignored by the gun.

function BulletWeapon:getIgnoreList(includeLocalPlayer)
	local now = tick()
	local ignoreList = self.ignoreList
	if not ignoreList or now - self.ignoreListRefreshTime > IGNORE_LIST_LIFETIME then
		ignoreList = {
			self.instanceIsTool and self.instance.Parent or self.instance,
			workspace.CurrentCamera
		}
		if not RunService:IsServer() then
			if includeLocalPlayer and Players.LocalPlayer and Players.LocalPlayer.Character then
				table.insert(ignoreList, Players.LocalPlayer.Character)
			end
		end
		for i,v in ipairs(myEpicIgnoreList) do
			table.insert(ignoreList, v)
		end
		self.ignoreList = ignoreList
	end
	return ignoreList
end

Sorry for the late reply, mb
Also I’d just like to say that yes, this weapon actually does use raycasting.

3 Likes

Yes this is exactly the explanation I needed! Thank you so much!