I’m using a beam with 2 attachments to show my laser sight, but even when trying to use a raycast it keeps going through walls! This is on a local script to keep it client-sided only. Does anyone know how to fix it? No errors or anything. The beam just stays in the same place that I first made it in. (this is all in a while loop btw)
script.Parent.Handle.Muzzle.Beam.Enabled = true
local rayParam = RaycastParams.new()
rayParam.FilterDescendantsInstances = {}
rayParam.FilterType = Enum.RaycastFilterType.Blacklist
local ray = workspace:Raycast(script.Parent.Handle.Muzzle.Position, script.Parent.Handle.Muzzle.CFrame.LookVector, rayParam)
if ray then
script.Parent.Handle.Muzzle.LaserPoint2.Position = ray.Position
end