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.

2 comments
Try using "player.Character.Torso" instead of "script.Parent.Parent.Parent.Parent.Character.Torso"
I tried to do it just then and it's still not working