I second this, some sort of Data parameter in Settings > UpdateSettings is causing errors
The error originates from here:
function Settings:UpdateSettings(Data: {})
-- Variable definitions
local Filter = self.Filter
local Params = self.RaycastParams
for Setting, Value in Data do
self[Setting] = Value
end
-- Update Param properties
Params.FilterDescendantsInstances = Filter
end
Update, I have taken it upon myself to fix the problem and have succeeded with a bit of work, here are the steps to fix the nil Data problem:
Inside of the UpdateSettings function in the Settings module, replace Settings:UpdateSettings with:
function Settings:UpdateSettings(Data: {})
-- Variable definitions
local Filter = self.Filter
local Params = self.RaycastParams
if Data then
for Setting, Value in Data do
self[Setting] = Value
end
end
-- Update Param properties
Params.FilterDescendantsInstances = Filter
end
Inside of the Operator module, replace the local Clone = table.clone(self.Handler) section with:
local Clone = table.clone(self.Handler)
Clone:UpdateSettings(Data or {})
Data = Clone
Inside of the Settings module, replace the Settings.new section with:
local self = setmetatable({
-- Replace with whatever you have here in the original Settings.new module
}, Settings)
-- Make sure the Data table actually is a table and not nil
Data = Data or {}
for Setting, Value in Data do
if Setting == "Tweens" then
for Tween, Info in Value do
self.Tweens[Tween] = Info
end
continue
end
self[Setting] = Value
end
return self, self:CreateParams()
Does this need to be destroyed if a new engine is created everytime the client respawns, or will it garbage collect itself? I don’t see a destroy method anywhere for this.
This gives me an error. I’m trying to use it in my NPC.
local bloodEngine = require(game.ReplicatedStorage:WaitForChild("BloodEngine"))
local Humanoid = script.Parent:WaitForChild("Humanoid")
local OldHealth = Humanoid.Health
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local Engine = bloodEngine.new({
Limit = 60, -- Sets the maximum number of droplets that can be created.
Type = "Decal", -- Defines the droplet type. It can be either "Default" (Sphere) or "Decal",
RandomOffset = false, -- Determines whether a droplet should spawn at a random offset from a given position.
OffsetRange = {-20, 10}, -- Specifies the offset range for the position vectors.
DropletVelocity = {1, 2}, -- Controls the velocity of the emitted droplet.
DropletDelay = {0.05, 0.1}, -- Sets the delay between emitting droplets in a loop (for the EmitAmount method).
StartingSize = Vector3.new(0.01, 0.7, 0.01), -- Sets the initial size of the droplets upon landing.
Expansion = false, -- Determines whether a pool can expand when a droplet lands on it.
MaximumSize = 1, -- Sets the maximum size a pool can reach.
})
Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
local Instances = Engine.RaycastParams.FilterDescendantsInstances
Engine.RaycastParams.FilterDescendantsInstances = {Instances and unpack(Instances), char}
if Humanoid.Health < OldHealth then
Engine:EmitAmount(script.Parent:FindFirstChild("Torso"), nil, 10)
end
OldHealth = Humanoid.Health
end)
Workspace.Respawning Dummy.Blood:20: attempt to index nil with 'FilterDescendantsInstances'
(If you need any ideas, here they are: make the spots disappear automatically after a certain time when the blood-creator script is destroyed, or without this function, the blood will remain FOREVER on the map and will not disappear) - I don’t know English well and may have made some mistakes in the text)