My raycast laser dosnt work

  1. What do you want to achieve?
    trying to make laser attachment for my weapon

  2. What is the issue?
    it dosnt work

  3. What solutions have you tried so far?
    asking my friend and google

local NormalPart = script.Parent.Parent.NormalPart
local RayPart = script.Parent

local MaxRayLenght = 100

local RayPrms =
RayPrms.FilterType = Enum.RaycastFilterType.Blacklist
RayPrms.FilterDescendantsInstances = {RayPart, NormalPart}
RayPrms.IgnoreWater = true

while wait() do
	local result = workspace:Raycast(RayPart.Position, RayPart.CFrame.LookVector * MaxRayLenght, RayPrms)
	if result then
		RayPart.Attachment1.WorldPosition = result.Position
		NormalPart.CFrame =, result.Position + result.Normal)
		RayPart.Attachment1.WorldPosition = RayPart.Position + (RayPart.CFrame.LookVector * MaxRayLenght)
		NormalPart.CFrame =

how the framework work is by cloning the viewmodel from the replicated storage to player camera when equipped the attachment sytem work by clone the attachment from replicated storage to the Camera.Arms