I’m making a barrage vfx like this and i anchored every part in the dummy , but when i unachored and try again the dummy will fling away how should i fix it?
https://gyazo.com/0f46b172d3aa00d476e979562d6bc225
while wait(.1) do
local Stand = script.Parent
local function BarrageVFX()
local LeftArm = Instance.new("Model", workspace)
LeftArm.Name = "LeftArms"
game.Debris:AddItem(LeftArm,.2)
local LeftHand = Stand.LeftHand:Clone()
LeftHand.Parent = LeftArm
LeftHand.Name = "Hand"
local LeftLower = Stand.LeftLowerArm:Clone()
LeftLower.Parent = LeftArm
LeftLower.Name = "Lower"
local LeftArms = Stand.LeftUpperArm:Clone()
LeftArms.Parent = LeftArm
LeftArms.Name = "Arm"
LeftArm.PrimaryPart = LeftArms
LeftArm.PrimaryPart.Anchored = true
LeftArm.PrimaryPart.CanCollide = false
local weld1 = Instance.new("WeldConstraint", LeftArm.PrimaryPart)
weld1.Part1 = LeftArms
weld1.Part0 = LeftHand
local weld1 = Instance.new("WeldConstraint", LeftArm.PrimaryPart)
weld1.Part1 = LeftArms
weld1.Part0 = LeftLower
local Attachment1 = script.Effect.Attachment:Clone()
Attachment1.Parent = LeftArms
local Attachment2 = script.Effect.Attachment1:Clone()
Attachment2.Parent = LeftArms
local Trail = script.Effect.Trail:Clone()
Trail.Parent = LeftArms
Trail.Attachment1 = Attachment1
Trail.Attachment0 = Attachment2
local BarrageVFX = script.Effect.Barrage:Clone()
BarrageVFX.Parent = LeftArms
LeftArm.PrimaryPart.CFrame = Stand.HumanoidRootPart.CFrame *CFrame.new(math.random(-2,2),math.random(-2.5,2.5),1.5) * CFrame.Angles(math.rad(90),0,0)
local MoveTween = game:GetService("TweenService"):Create(LeftArm.PrimaryPart, TweenInfo.new(.3), {CFrame = LeftArm.PrimaryPart.CFrame * CFrame.new(0,-15,0)})
MoveTween:Play()
for i, v in pairs(LeftArm:GetDescendants()) do
if v:IsA("BasePart") then
v.Transparency = 1
elseif v.Name == "Aura" then
v:Destroy()
end
end
local RightArm = Instance.new("Model", workspace)
RightArm.Name = "RightArms"
game.Debris:AddItem(RightArm,.2)
local RightHand = Stand.RightHand:Clone()
RightHand.Parent = RightArm
RightHand.Name = "Hands"
local RightLower = Stand.RightLowerArm:Clone()
RightLower.Parent = RightArm
RightLower.Name = "Lowers"
local RightArms = Stand.RightUpperArm:Clone()
RightArms.Parent = RightArm
RightArms.Name = "Arms"
RightArm.PrimaryPart = RightArms
RightArm.PrimaryPart.Anchored = true
RightArm.PrimaryPart.CanCollide = false
local weld1 = Instance.new("WeldConstraint", RightArm.PrimaryPart)
weld1.Part1 = RightArms
weld1.Part0 = RightHand
local weld1 = Instance.new("WeldConstraint", RightArm.PrimaryPart)
weld1.Part1 = RightArms
weld1.Part0 = RightLower
local Attachment1 = script.Effect.Attachment:Clone()
Attachment1.Parent = RightArms
local Attachment2 = script.Effect.Attachment1:Clone()
Attachment2.Parent = RightArms
local Trail = script.Effect.Trail:Clone()
Trail.Parent = LeftArms
Trail.Attachment1 = Attachment1
Trail.Attachment0 = Attachment2
local BarrageVFX = script.Effect.Barrage:Clone()
BarrageVFX.Parent = RightArms
RightArm.PrimaryPart.CFrame = Stand.HumanoidRootPart.CFrame *CFrame.new(math.random(-2,2),math.random(-2.5,2.5),1.5) * CFrame.Angles(math.rad(90),0,0)
local MoveTween = game:GetService("TweenService"):Create(RightArm.PrimaryPart, TweenInfo.new(.3), {CFrame = RightArm.PrimaryPart.CFrame * CFrame.new(0,-15,0)})
MoveTween:Play()
for i, v in pairs(RightArm:GetDescendants()) do
if v:IsA("BasePart") then
v.Transparency = 1
elseif v.Name == "Aura" then
v:Destroy()
end
end
end
BarrageVFX()
BarrageVFX()
end