what i want to do is make a kind of "hole puncher" sniper by subtracting the beam to the part that is being shot at. however, it doesn't work and the output says "Attempt to connect failed: Passed value is not a function".
here is the function to punch the hole
a script in serverScriptService
negatePartRemoteFunction.OnServerInvoke = function (beam,part,player) local success, punchedPart = pcall(function() return part:SubtractAsync({beam}) end) if success then print("The union operation is successful.") end if success and punchedPart then punchedPart.Position = part.Position punchedPart.Anchored = true punchedPart.Name = part.Name punchedPart.Parent = part.Parent part:Destroy() print("The replacement is successful.") negateSuccess:FireClient(player) end end