"Member blacklist is deprecated"

i have an issue in the script when i type in Enum.RaycastFilterType.Blacklist it says to with blue outline “Member blacklist is deprecated” i dont khow what that means, anyone have an idea or solution?

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")

local Range = 500

ReplicatedStorage.Shoot.OnServerEvent:Connect(function(Player, MousePos, Target)
	local Revolver = Player.Character:FindFirstChildOfClass("Tool")
	local Dmg = Revolver.Dmg.Value
	
	if Revolver == nil then return end
	
	local Dmg = Revolver.Dmg.Value
	
	local Direction = [MousePos - Revolver.Handle.Position] * Range
	
	local RayParams = RaycastParams.new()
	RayParams.FilterDescendantsInstances = {Player.Character}
	RayParams.FilterType = Enum.RaycastFilterType.Blacklist
	
	local Result = workspace:Raycast(Revolver.Handle.Position, Direction, RayParams)
	
end)
2 Likes

Deprecation means that something isn’t formally supported by Roblox anymore. Specifically in this exact context, the functionality is actually still supported, just under a different name. Use Enum.RaycastFilterType.Exclude instead.

8 Likes

it still works but use

Enum.RaycastFilterType.Exclude

if you don’t want to be annoyed

1 Like

put --!nolint at the top of the script

2 Likes

Theres no way they deprecated whitelist and blacklist :skull:

Whitelist and Blacklist have been replaced with Include and Exclude respectively, which have clearer names.

They likely created 2 new Enums and deprecated the old ones to avoid messing up outdated code. The downside is those functions could break in the future, bringing older Roblox games with it.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.