Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

LevelUp Script not working for Particle cloning?

Asked by 6 years ago

I have created a script for my friend's game. I'm not including the entire script since it's 264 lines of code. The script is supposed to clone particles when a player levels up, the particles are very specific and are within the script. I've narrowed it down to this snippet of coding:

on = false

function onLevelUp(player, XP, level) 
    if player.Character~=nil then 
        for i = 1,5 do 
        script.Parent.Parent.Parent.Parent.Character.Torso.ParticleEmitter.Parent = nil
        on = false
        local e = script.ParticleEmitter:Clone()
        e.Parent = script.Parent.Parent.Parent.Parent.Character.Torso
        script.Sound:Play() 
        wait(3)
        on = true
        end
    end

Thanks for reading/replying.

0
Try using "player.Character.Torso" instead of "script.Parent.Parent.Parent.Parent.Character.Torso" ax_gold 360 — 6y
0
I tried to do it just then and it's still not working STICKYBUN10 19 — 6y

Answer this question