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

Why won't the Emitter Parent to UpperTorso?

Asked by
Despayr 505 Moderation Voter
5 years ago
Edited 5 years ago

Replaced with the full script. My problem is that the Particle Emitter is told to be parented to the BodyBackAttachment in the UpperTorso, but instead it just parents to the players character.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Characters = ReplicatedStorage.Characters
local Powers = ReplicatedStorage.Powers

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(Character)
    Character.Head.face.Texture = ""    
    local UpperTorso = Character.UpperTorso

    local Data = plr:WaitForChild("Data")
    for i, v in pairs(Data:GetChildren()) do
        if v.Value == "" then repeat wait(0.2) until v.Value ~= ""
        end
        end


    plr.CharacterLoaded.Value = true

    for i, child in pairs(Characters[Data.CurrentCharacter.Value]:GetChildren()) do
        wait()
        local Assets = child:Clone()
        if Assets.Name ~= "ParticleEmitter" or Assets.Name ~= "LocalScript" then
        Assets.Parent = Character

        elseif Assets:IsA("LocalScript") then
            Assets.Parent = plr.Backpack

        elseif Assets.Name == "ParticleEmitter" then
            Assets.Parent = UpperTorso.BodyBackAttachment
            end
        end
    end)
end)

Everything else parents properly

0
the 2nd arguement of Instance.new is deprecated green271 635 — 5y
0
you didn't post the whole script. if you did, it is wrong FirezoneGamez 155 — 5y
0
posted the full script to make it easier Despayr 505 — 5y
0
This should have worked but it didn't. Thanks anyway, I had to create another :GetChildren function with a different folder named auras. Either way it works now. Despayr 505 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

ParticleEmitters can only be parented to parts, you cant put it in an Attachment

0
Actually they can be parented to attachments, either way I found an alternative way. Thanks anyways. Despayr 505 — 5y
Ad

Answer this question