#VFX not working

1 messages · Page 1 of 1 (latest)

south plume
#

yo guys im having some problems with my script, and i DO NOT UNDERSTAND THE PROBLEM. btw i did not every local in here, because of to much text.

this is the code:

UIS.InputBegan:Connect(function(I,E) -- checkt of je niet aan het typen bent in de chat
if I.KeyCode == Enum.KeyCode.One then -- nu gaat er iets gebeuren als je muis 1 clikt
if E then return end
if character:FindFirstChild("Stunned") then return end
if special1cooldown == false then

        game.ReplicatedStorage.MainEvent:FireServer("one")

        local SharkBiteEffect = game.ReplicatedStorage.VFX.SharkBiteVFX:Clone()
        SharkBiteEffect.Anchored = true
        SharkBiteEffect.CFrame = character.HumanoidRootPart.RootAttachment.WorldCFrame
        SharkBiteEffect.Parent = workspace.VFXclone

        SharkBite:Play()

        SharkBite:GetMarkerReachedSignal("BiteOne"):Connect(function(paramString)
        for _, Particles in pairs(SharkBiteEffect:GetDescendants()) do
            if Particles:IsA("ParticleEmitter") then
                local emitCount = Particles:GetAttribute("EmitCount")
                if emitCount then
                    Particles:Emit(emitCount)
                else
                    warn("Emitter zonder EmitCount:", Particles:GetFullName())
                end
            end
        end
    end)    
    
    wait(0.6)
    SharkBiteEffect:Destroy()
        -- Speel animatie af

        -- Cooldown
    special1cooldown = true
    wait(1)
    special1cooldown = false
    
    end
end

end)

barren rover
#

errors?

#

and what exactly is not working

south plume
#

the particale emmite part was just WRONG

#

local pathToEmit = workspace.whereeveryourparticlesare
for _,Particles in pairs(pathToEmit:GetDescendants()) do
if Particles:IsA("ParticleEmitter") then
Particles:Emit(Particles:GetAttribute("EmitCount"))
end
end

this correct version