I have a blood system that uses raycast to detect when a blood drip touches something, then creates a pool of blood where it touches. For some reason it suddenly isnt working, and the ray isnt even being casted, I tried removing the blacklist but it still didnt work. Here is the code:
game:GetService("RunService").Heartbeat:Connect(function()
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Blacklist
local t = {script.Parent, script.Parent.Parent}
params.FilterDescendantsInstances = t
local ray = workspace:Raycast(script.Parent.Position, Vector3.new(0,-1,0), params)
if ray then
print("ray has casted :)")
if ray.Instance.Anchored == true and ray.Instance.CanCollide == true then
local s = game.ReplicatedStorage.BloodPuddle:Clone()
s.Parent = script.Parent.Parent
s.Color = script.Parent.Color
s.Position = ray.Position
script.Parent:Destroy()
end
end
end)
This script is inside the blood drips, each one has this script inside of it.