#need help. for some reason it doesnt find something

1 messages · Page 1 of 1 (latest)

feral lion
#

hm

#

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

civic falcon
# feral lion prints fine from

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

feral lion
#

so i should probably make it so it sends the part

#

and emits every particle in it for each client

civic falcon
#

trying to send the part is why its not working

#

the most efficient option would be sending the data needed to recreate the part

#

realistically in your case you just need a cframe for it

feral lion
#

i already have the part in rep storage

#

i fixed it btw

#

so

#

i just need to send the name and the cframe of it

#

tbh