Script is not cloning

So my problem is, whenever a player is dying, I want to put something inside the torso, but it’s not cloning and not putting it inside of the player’s torso. However it is printing True and Done but the cloning never happened and it also doesn’t print any errors.

--This is inside a script, so it might seem weird but everything works except the cloning
		hum.Died:Connect(function()
			if game.ReplicatedStorage.Game.InGame:FindFirstChild(Char.Name) then
				game.ReplicatedStorage.Game.InGame:FindFirstChild(Char.Name).Parent = game.ReplicatedStorage.Game.OutGame
			end
			local inv = game.ReplicatedStorage.Inventories:FindFirstChild(plr.Name)
			if inv.AquaAura.Value == true then
				print("True")
				wait(6)
				local clr = game.ReplicatedStorage.Auras.Aqua.Part.Att01:Clone()
				clr.Parent = Char:FindFirstChild("Torso", true)
				print("Done")
			elseif inv.DbzAura.Value == true then
				wait(6)
				local clr = game.ReplicatedStorage.Auras.Dbz.Part.Att01:Clone()
				clr.Parent = Char:FindFirstChild("Torso", true)
			elseif inv.DiscoAura.Value == true then
				wait(6)
				local clr = game.ReplicatedStorage.Auras.Disco.Part.Att01:Clone()
				clr.Parent = Char:FindFirstChild("Torso", true)
			elseif inv.MagicAura.Value == true then
				wait(6)
				local clr = game.ReplicatedStorage.Auras.Magic.Part.Att01:Clone()
				clr.Parent = Char:FindFirstChild("Torso", true)
			end
		end)

Thank you for reading!

You should optimize your script to not be hardcoded with your auras. Meaning that the script automatically decides which aura to use based off of which they have equipped, so you don’t have to check each of them specifically to see if they’re equipped. This might not immediatly fix your issue, though.

Hm I think I get, I could also make Bool Values, if for instance it’s true, then that aura would be visible, and I could also make another Bool value called equipped, if the player died it would turn false, then it would create a new aura and turn it to true, and that looped so it never ends.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.