So i’m trying to make an aura script that parents an aura to every base part in the players character but this script only parented the auras to the humanoidrootpart and the head. Why?
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
for i, v in pairs(char:GetChildren()) do
if v:IsA("BasePart") then
local aura = game:GetService("ServerStorage"):WaitForChild("Aura"):Clone()
aura.Parent = v
end
end
end)
end)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
for i, v in pairs(char:GetChildren()) do
if v:IsA("BasePart") or v:IsA("MeshPart") then
local aura = game:GetService("ServerStorage"):WaitForChild("Aura"):Clone()
aura.Parent = v
end
end
end)
end)
I tried this but it didn’t work, am i doing something wrong?
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
for i, v in pairs(char:GetChildren()) do
if v:IsA("BasePart") then
local aura = game:GetService("ServerStorage"):WaitForChild("Aura"):Clone()
print(v)
aura.Parent = char:WaitForChild(v.Name)
end
end
end)
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char:WaitForChild("Humanoid")
for i, v in pairs(char:GetChildren()) do
if v:IsA("BasePart") then
local aura = game:GetService("ServerStorage"):WaitForChild("Aura"):Clone()
aura.Parent = v
end
end
end)
end)