You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m trying to create a pistol using raycasting -
What is the issue? Include screenshots / videos if possible!
I cannot input a table of ignored objects into the raycast -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried making a separate table and adding all the ignored parts, but I think I’ve made it more confusing.
local ignoredlist = {}
local part = {}
wait()
for i, v in pairs(character:GetChildren()) do
if v:IsA("Part") then
table.insert(part,1,v)
end
end
table.insert(ignoredlist,1, part)
table.insert(ignoredlist,3, pistol:GetChildren())
print(ignoredlist)
pistol.Activated:Connect(function()
if not debounce then
debounce = true
local aRay = Ray.new(barrel.Position, (Vector3.new(0,0,0) + (barrel.CFrame.LookVector * 100000)))
local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(aRay, ignoredlist, false, false)
It is my first time using raycast and I don’t understand how to put ignored items using tables. I am trying to make the barrel of the pistol and the character ignored from the raycast.