How do i make it so when the raycast part detects the player and then exclude the player from stopping the part from being detected again then still continue to try to detect its target
From what I understand, you don’t want the raycast to detect a person and only it’s target? You can use FindPartOnRayWithWhiteList to only be able to detect the target
This will make a raycast ignore the player.
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
raycastParams.FilterDescendantsInstances = {game:GetService("Players").LocalPlayer.Character}
local result = workspace:Raycast(origin, direction, raycastParams)
result is a RaycastResult object.
This gives you a better example of raycasting.