#need help. for some reason it doesnt find something
1 messages · Page 1 of 1 (latest)
you see
that i get the parent
and i use it
everything is fine
BUT
after this one
this replicator prints nil:
and this is the module line that emits the particle:
Emititter.PlayEffects(particleData.parent, 1,0)
module ```lua
local module = {}
function module.PlayEffects(container,times,LoopDelay)
if #container:GetChildren() > 0 then
for _,particles in pairs(container:GetDescendants()) do
if particles:IsA("ParticleEmitter") then
local EmitCount = particles:GetAttribute("EmitCount")
local EmitDelay = particles:GetAttribute("EmitDelay")
if EmitDelay then
task.delay(EmitDelay,function()
for i = 1, times do
particles:Emit(EmitCount)
if LoopDelay >= 0 then
wait(LoopDelay)
end
end
end)
else
particles:Emit(EmitCount)
end
end
end
else
if container:IsA("ParticleEmitter") then
local EmitCount = container:GetAttribute("EmitCount")
local EmitDelay = container:GetAttribute("EmitDelay")
if EmitDelay then
task.delay(EmitDelay,function()
for i = 1, times do
container:Emit(EmitCount)
if LoopDelay > 0 then
wait(LoopDelay)
end
end
end)
else
container:Emit(EmitCount)
end
end
end
end
return module
the nil is from the
replicator
prints fine from
the caller client
idk how to fix it
instances created on the client do not exist on the server
sending it through a remote event will be seen as an invalid pointer by the recipient
youll have to create the instance on the server for it to work
or send the info necessary for each client to make their own version rather than the part you already made
so i should probably make it so it sends the part
and emits every particle in it for each client