Ray cast giving warning

A warning is showing up in my code. I have no idea how I could solve it.

local rayParams = RaycastParams.new()
rayParams.FilterDescendantsInstances = {player.Character}
rayParams.FilterType = Enum.RaycastFilterType.Blacklist 
-- Warning on Enum.RaycastFilterType.Blacklist
2 Likes

try printing out the mousePosition variable and the CFrame variable on the part that multiplies the CFrames.

1 Like

In the second script, you aren’t setting the CFrame value to anything

Try this instead:

TweenService:Create(bullet, TweenInfo.new(bulletDeration), {CFrame = CFrame * CFrame.new(mousePosition)}):Play()

I can’t help you with the first script cuz i have no knowledge whatsoever in Raycasting.

3 Likes

For the Enum.RaycastFilterType.Blacklist sentence, replace it with Enum.RaycastFilterType.Exclude. Roblox just gave the Enum a different name.

Ex;

Enum.RaycastFilterType.Blacklist = Enum.RaycastFilterType.Exclude
Enum.RaycastFilterType.Whitelist = Enum.RaycastFilterType.Include

2 Likes

I tried that it did not work, I think it has to do with the first argument so bullet.

I moved that part to of the post to:

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