function ProjectileReplication.SendProjectile(g,p,J)local I=RaycastParams.new()I.FilterType=Enum.RaycastFilterType.Blacklist I.FilterDescendantsInstances={Local_Player.Character;workspace.CurrentCamera}local w=workspace:Raycast(p,J*99999,I)local k=nil if w then k=PartUtility.GetCharacterFromInstance_R(w.Instance)end RE_CreateProjectile:FireServer(g:GetIDName(),p,J,k)return w end
-- @Context Client
-- Send a request to the server for a projectile to be created.
-- @param WeaponDefinition weaponDefinition
-- @param Vector3 position
-- @param Vector3 direction
function ProjectileReplication.SendProjectile(weaponDefinition, position, direction)
	--print("Sending projectile!",weaponDefinition,position,direction)

	local clientRaycastParams = RaycastParams.new()
	clientRaycastParams.FilterType = Enum.RaycastFilterType.Blacklist

	-- Ignore the character and the camera which has the first person view model attached
	clientRaycastParams.FilterDescendantsInstances = {
		Local_Player.Character,
		workspace.CurrentCamera,
	}

	local hitResult = workspace:Raycast(position, direction * 99999, clientRaycastParams)

	local hitCharacter = nil

	if hitResult then
		hitCharacter = PartUtility.GetCharacterFromInstance_R(hitResult.Instance)
	end

	-- Send to server the request to create the projectile
	RE_CreateProjectile:FireServer(weaponDefinition:GetIDName(), position, direction, hitCharacter)

	return hitResult
end
