I have a script that creates a barrage of hands using a viewmodel. Once you activate the tool it will active the barrage effect. The issue is, I dont know how to put the shirt on each part in the viewmodel. There are 6 parts in the viewmodel. The player using the barrage is in R15 and the viewmodel is R6 with 6 hands.
Barrage View Model: (L1, L2, L3 are left arms, and R1,R2,R3 are right arms)
local Remote = script.Parent
local BarrageDebounce = false
local BarrageCanDamage = false
local BarrageCombo = 1
local CanActivateDebounce = true
local TweenService = game:GetService("TweenService")
local RMod = require(game.ReplicatedStorage:WaitForChild("RotatedRegion3"))
local hitAnims = {
'rbxassetid://12369817956',
'rbxassetid://12369822192',
'rbxassetid://12369817956',
'rbxassetid://12369822192',
'rbxassetid://12369817956',
}
Remote.OnServerEvent:Connect(function(Player,Action,Action2)
local Char = Player.Character
local HumRP = Char:WaitForChild("HumanoidRootPart")
local Hum = Char:WaitForChild("Humanoid")
local enemyChar
local BarrageAnim = Hum:LoadAnimation(script:WaitForChild("BarrageAnim"))
if Action == "Barrage" then
if BarrageDebounce == false and Char:FindFirstChild("Disabled") == nil and Action2 == "BarrageStart" then
BarrageDebounce = true
BarrageCanDamage = true
Char["LeftUpperArm"].Transparency = 1;Char["RightUpperArm"].Transparency = 1; Char["LeftLowerArm"].Transparency = 1;Char["RightLowerArm"].Transparency = 1; Char["LeftHand"].Transparency = 1;Char["RightHand"].Transparency = 1
local ting = game:GetService("ServerStorage").InvisHands:Clone() -- get the fake arms from the server storage
ting.AnimSaves:Destroy()
ting.Parent = Char
for i,v in next, ting:GetChildren() do -- get the hands then recolor them
if v:IsA("Part") then
if v.Name == "L1" or v.Name == "L2" or v.Name == 'L3' then
v.Color = Char["RightUpperArm"].Color
elseif v.Name == "R1" or v.Name == "R2" or v.Name == 'R3' then
v.Color = Char["LeftUpperArm"].Color
end
end
end
local weld = Instance.new("Motor6D",ting.Main) -- lock the barrage hands to the players root part
weld.Part0 = weld.Parent
weld.Part1 = Char.HumanoidRootPart
Char.HumanoidRootPart.Anchored = false -- unanchor the player
local anim = script.BarrageAnim
ting.AnimationController.Animator:LoadAnimation(anim):Play() -- finally, play the barrage animation
-- BarrageAnim:Play()
Hum.WalkSpeed = 10
--[[local HiteffectBall = function(Target,Pos)
local ClonedBall = script:WaitForChild("Thing"):Clone()
ClonedBall.Parent = Target
ClonedBall.CFrame = Pos
ClonedBall.CFrame = CFrame.new(ClonedBall.Position, Target.Position)
game.Debris:AddItem(ClonedBall,1)
TweenService:Create(ClonedBall,TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut),{CFrame = ClonedBall.CFrame + ClonedBall.CFrame.lookVector * -7,Transparency = 1,Size = Vector3.new(0.087, 0.08, 3.35)}):Play()
end]]
delay(4.65,function()
if CanActivateDebounce == true then
BarrageCanDamage = false
CanActivateDebounce = false
local AnimationTracks = Hum:GetPlayingAnimationTracks()
for i,track in pairs(AnimationTracks) do
track:Stop()
end
Hum.WalkSpeed = 16
Char.HumanoidRootPart.Anchored = false
if enemyChar then
enemyChar.HumanoidRootPart.Anchored = false
end
delay(6,function()
BarrageDebounce = false
CanActivateDebounce = true
end)
end
end)
repeat
wait(0.05)
if BarrageCombo == 1 then
BarrageCombo = 2
local OraSound = script:WaitForChild("Barrage"):Clone()
OraSound.Parent = HumRP
OraSound.PlaybackSpeed = math.random(140,180)/100
game.Debris:AddItem(OraSound,0.4)
OraSound:Play()
local HB = Instance.new("Part")
HB.Size = Vector3.new(4,4,6)
HB.CFrame = HumRP.CFrame * CFrame.new(0,0,-3)
game.Debris:AddItem(HB,0.08)
local RHB = RMod.FromPart(HB)
local RTable = RHB:Cast(Char)
for i,v in pairs(RTable) do
if v.Name == "HumanoidRootPart" then
local EHumRP = v
local EHum = v.Parent:FindFirstChild("Humanoid")
if not EHum.Parent.StatusFolder:FindFirstChild('Knocked') then
if EHum and v.Parent:FindFirstChild('StatusFolder'):FindFirstChild('Uptilt') and EHum.Health > 0.5 then
EHum:TakeDamage(0.5)
EHum.Parent.HumanoidRootPart.Anchored = true
Char.HumanoidRootPart.Anchored = true
enemyChar = EHum.Parent
local animation = Instance.new('Animation', workspace.Fx)
animation.AnimationId = hitAnims[1]
game.Debris:AddItem(animation, 0.1)
local anim = EHum:LoadAnimation(animation)
anim:Play()
elseif EHum and EHum.Health > 0.5 then
EHum:TakeDamage(0.5)
local animation = Instance.new('Animation', workspace.Fx)
animation.AnimationId = hitAnims[1]
game.Debris:AddItem(animation, 0.1)
local anim = EHum:LoadAnimation(animation)
anim:Play()
elseif EHum.Health <= 0.5 then
EHum.Health = 1
end
EHum.WalkSpeed = 8
delay(0.05,function()
EHum.WalkSpeed = 16
end)
local Count = 0
repeat
Count = Count + 1
-- HiteffectBall(HumRP,EHumRP.CFrame * CFrame.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)))
until Count >= 3
end
end
end
elseif BarrageCombo == 2 then
BarrageCombo = 1
local OraSound = script:WaitForChild("Barrage2"):Clone()
OraSound.Parent = HumRP
OraSound.PlaybackSpeed = math.random(140,180)/100
game.Debris:AddItem(OraSound,0.3)
OraSound:Play()
if enemyChar then
local animation = Instance.new('Animation', workspace.Fx)
animation.AnimationId = hitAnims[2]
game.Debris:AddItem(animation, 0.1)
local anim = enemyChar.Humanoid:LoadAnimation(animation)
anim:Play()
end
end
until BarrageCanDamage == false
if enemyChar then
enemyChar.HumanoidRootPart.Anchored = false
end
if Char:FindFirstChild('InvisHands') then
Char:FindFirstChild('InvisHands'):Destroy()
end
Char["LeftUpperArm"].Transparency = 0;Char["RightUpperArm"].Transparency = 0; Char["LeftLowerArm"].Transparency = 0;Char["RightLowerArm"].Transparency = 0; Char["LeftHand"].Transparency = 0;Char["RightHand"].Transparency = 0
elseif BarrageDebounce == true and CanActivateDebounce == true then
CanActivateDebounce = false
BarrageCanDamage = false
local OraSound = HumRP:FindFirstChild("MudaBarrage")
if OraSound ~= nil then
OraSound:Destroy()
end
Hum.WalkSpeed = 16
if enemyChar then
enemyChar.HumanoidRootPart.Anchored = false
end
delay(5,function()
BarrageDebounce = false
CanActivateDebounce = true
end)
local AnimationTracks = Hum:GetPlayingAnimationTracks()
for i,track in pairs(AnimationTracks) do
track:Stop()
end
end
end
end)
Thanks for the help!