-
What do you want to achieve? A particle effect with a trail on their hands
-
What is the issue? I’m getting an error saying that the attachment isn’t a part of the left hand but I instanced it and parented it to the had
-
What solutions have you tried so far? I’ve tried to re write it and check for spelling errors but I found nothing
the code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Glow1 = ReplicatedStorage:FindFirstChild("Glow")
local Glow2 = ReplicatedStorage:FindFirstChild("ParticleEmitter")
local Glow3 = ReplicatedStorage:FindFirstChild("Ray")
local Glow4 = ReplicatedStorage:FindFirstChild("Rays")
local Trail = ReplicatedStorage:FindFirstChild("Trail")
local Parts = script.Parent:GetChildren()
for _, Part in pairs(Parts) do
if Part.Name == "LeftHand" or Part.Name == "RightHand" then
local Glow1InChar = Glow1:Clone()
Glow1InChar.Parent = Part
local Glow2InChar = Glow2:Clone()
Glow2InChar.Parent = Part
local Glow3InChar = Glow3:Clone()
Glow3InChar.Parent = Part
local Glow4InChar = Glow4:Clone()
Glow4InChar.Parent = Part
local Attatchment0 = Instance.new("Attachment")
Attatchment0.Name = "Attatchment0"
Attatchment0.Parent = Part
local Attachment1 = Instance.new("Attachment")
Attachment1.Name = "Attachment1"
Attachment1.Parent = Part
local Trail1 = Trail:Clone()
Trail1.Parent = Part
Trail1.Attachment0 = Part.Attachment0
Trail1.Attachment1 = Part.Attachment1
end
end