local RunService = game:GetService("RunService")
laser = Instance.new("Part")
while true do
RunService.Heartbeat:Wait()
local res = workspace:Raycast(script.Parent.Position,script.Parent.CFrame.LookVector*100)
if res then
laser.Material = Enum.Material.Neon
laser.BrickColor = BrickColor.Red()
laser.CanCollide = false
laser.Anchored = true
laser.Parent = workspace
laser.CFrame = CFrame.new((script.Parent.Position+res.Position)/2,res.Position)
laser.Size = Vector3.new(.1,.1,(script.Parent.Position-res.Position).Magnitude)
end
end
The script ^ What happens: https://gyazo.com/d6d13f11fbedab88073126b988913e9f

2 comments
I think that it's seeing the laser part when you try to raycast, try to add the laser part to the blacklist
Yeah id di that it works