not gonna explain it but i will send the proper script, here you go.
function lerp(a, b, c)
return a + (b - a) * c
end
function quadBezier(t, p0, p1, p2)
local l1 = lerp(p0, p1, t)
local l2 = lerp(p1, p2, t)
local quad = lerp(l1, l2, t)
return quad
end
game.ReplicatedStorage.Barrage.OnServerEvent:Connect(function(p,dmg)
local Character = p.Character
local Humanoid = Character.Humanoid
local Stand = Character.Stand
spawn(function()
local part
local leftOrRight = math.random(1,2)
local p0 = Stand.StandHumanoidRootPart.Position
local p1
if leftOrRight == 1 then
-- right
part = Stand["Stand Right Arm"]:Clone()
p1 = Stand.StandHumanoidRootPart.Right.WorldPosition + Vector3.new(0,math.random(-2,2),0)
end
for i,v in pairs(part:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
game.TweenService:Create(v,TweenInfo.new(1),{Transparency = 0}):Play()
end
end
part.Parent = workspace
part.CanCollide = false
part.Anchored = true
local p2 = Stand.StandHumanoidRootPart.End.WorldPosition
local tweendelay = wait()
game.Debris:AddItem(part,1)
game.TweenService:Create(part,TweenInfo.new(1),{Transparency = 1}):Play()
for i = 1, 10 do
local t = i/10
local Pos = quadBezier(t, p0, p1, p2)
local Direction = quadBezier(t + 0.015, p0, p1, p2)
--part.CFrame = CFrame.new(Pos, Direction)
game.TweenService:Create(part,TweenInfo.new(tweendelay),{CFrame = CFrame.new(Pos, Direction) * CFrame.Angles(math.rad(90),0,0)}):Play()
wait()
end
end)
end)
game.ReplicatedStorage.Barrage.OnServerEvent:Connect(function(p,dmg)
local Character = p.Character
local Humanoid = Character.Humanoid
local Stand = Character.Stand
spawn(function()
local part
local leftOrRight = math.random(1,2)
local p0 = Stand.StandHumanoidRootPart.Position
local p1
if leftOrRight == 1 then
-- left
part = Stand["Stand Left Arm"]:Clone()
p1 = Stand.StandHumanoidRootPart.Left.WorldPosition + Vector3.new(0,math.random(-2,2),0)
end
for i,v in pairs(part:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
game.TweenService:Create(v,TweenInfo.new(1),{Transparency = 0}):Play()
end
end
part.Parent = workspace
part.CanCollide = false
part.Anchored = true
local p2 = Stand.StandHumanoidRootPart.End2.WorldPosition
local tweendelay = wait()
game.Debris:AddItem(part,1)
game.TweenService:Create(part,TweenInfo.new(1),{Transparency = 1}):Play()
for i = 1, 10 do
local t = i/10
local Pos = quadBezier(t, p0, p1, p2)
local Direction = quadBezier(t + 0.015, p0, p1, p2)
--part.CFrame = CFrame.new(Pos, Direction)
game.TweenService:Create(part,TweenInfo.new(tweendelay),{CFrame = CFrame.new(Pos, Direction) * CFrame.Angles(math.rad(90),0,0)}):Play()
wait()
end
end)
end)
game.ReplicatedStorage.Barrage.OnServerEvent:Connect(function(p,dmg)
local Character = p.Character
local Humanoid = Character.Humanoid
local Stand = Character.Stand
spawn(function()
local part
local leftOrRight = math.random(1,2)
local p0 = Stand.StandHumanoidRootPart.Position
local p1
if leftOrRight == 1 then
-- right
part = Stand["Stand Right Arm"]:Clone()
p1 = Stand.StandHumanoidRootPart.Right2.WorldPosition + Vector3.new(0,math.random(-2,2),0)
end
for i,v in pairs(part:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
game.TweenService:Create(v,TweenInfo.new(1),{Transparency = 0}):Play()
end
end
part.Parent = workspace
part.CanCollide = false
part.Anchored = true
local p2 = Stand.StandHumanoidRootPart.End.WorldPosition
local tweendelay = wait()
game.Debris:AddItem(part,1)
game.TweenService:Create(part,TweenInfo.new(1),{Transparency = 1}):Play()
for i = 1, 10 do
local t = i/10
local Pos = quadBezier(t, p0, p1, p2)
local Direction = quadBezier(t + 0.015, p0, p1, p2)
--part.CFrame = CFrame.new(Pos, Direction)
game.TweenService:Create(part,TweenInfo.new(tweendelay),{CFrame = CFrame.new(Pos, Direction) * CFrame.Angles(math.rad(90),0,0)}):Play()
wait()
end
end)
end)
game.ReplicatedStorage.Barrage.OnServerEvent:Connect(function(p,dmg)
local Character = p.Character
local Humanoid = Character.Humanoid
local Stand = Character.Stand
spawn(function()
local part
local leftOrRight = math.random(1,2)
local p0 = Stand.StandHumanoidRootPart.Position
local p1
if leftOrRight == 1 then
-- left
part = Stand["Stand Left Arm"]:Clone()
p1 = Stand.StandHumanoidRootPart.Left2.WorldPosition + Vector3.new(0,math.random(-2,2),0)
end
for i,v in pairs(part:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
game.TweenService:Create(v,TweenInfo.new(1),{Transparency = 0}):Play()
end
end
part.Parent = workspace
part.CanCollide = false
part.Anchored = true
local p2 = Stand.StandHumanoidRootPart.End2.WorldPosition
local tweendelay = wait()
game.Debris:AddItem(part,1)
game.TweenService:Create(part,TweenInfo.new(1),{Transparency = 1}):Play()
for i = 1, 10 do
local t = i/10
local Pos = quadBezier(t, p0, p1, p2)
local Direction = quadBezier(t + 0.015, p0, p1, p2)
--part.CFrame = CFrame.new(Pos, Direction)
game.TweenService:Create(part,TweenInfo.new(tweendelay),{CFrame = CFrame.new(Pos, Direction) * CFrame.Angles(math.rad(90),0,0)}):Play()
wait()
end
end)
end)
And put this inside the stand model
local p = game.Players.LocalPlayer
local c = p.Character
local h = c:WaitForChild("Humanoid")
local stand = c.Stand
local hrp = c.HumanoidRootPart
local shrp = stand.StandHumanoidRootPart
local uis = game:GetService("UserInputService")
local lmbCount = 0
local Idle = h:LoadAnimation(game.ReplicatedStorage.Animations.TWIDLE)
local Chop = h:LoadAnimation(game.ReplicatedStorage.Animations.TWMUDA)
local Barrage = h:LoadAnimation(game.ReplicatedStorage.Animations.TWBarrage)
local lmb1 = h:LoadAnimation(game.ReplicatedStorage.Animations.TWLMB1)
local lmb2 = h:LoadAnimation(game.ReplicatedStorage.Animations.TWLMB2)
local knifeThrow = h:LoadAnimation(game.ReplicatedStorage.Animations.KnifeThrow)
-- CameraShaker
local Camera = workspace.Camera
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remotes = ReplicatedStorage.Remotes
local CameraFolder = game.ReplicatedStorage.Remotes.Camera
local CameraShaker = require(game.ReplicatedStorage:WaitForChild("CameraShaker"))
local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCf)
Camera.CFrame = Camera.CFrame * shakeCf
end)
camShake:Start()
--
-- Events
local damage = game.ReplicatedStorage.Damage
local barrageEffect = game.ReplicatedStorage.Barrage
--
local ChopCooldown = false
local BarrageCooldown = false
local lmbCD = false
local KnifeCoolDown = false
local beep = false
local active = false
local appeared = false
uis.InputBegan:Connect(function(k,chat)
if active == true then return end
if chat then return end
if k.KeyCode == Enum.KeyCode.Q then
if appeared == false then
appeared = true
Idle:Play(0)
for i,v in pairs(stand:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
if v.Name ~= "StandHumanoidRootPart" and v.Parent.Name ~= "KnifeModel" then
game.ReplicatedStorage.Transparency:FireServer(v,.4,0)
end
end
end
else
Idle:Stop()
appeared = false
for i,v in pairs(stand:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
game.ReplicatedStorage.Transparency:FireServer(v,.4,1)
end
end
end
elseif k.KeyCode == Enum.KeyCode.E and BarrageCooldown == false and appeared == true then
local HM = 0
active = true
Barrage:Play(.1,1,2)
camShake:Shake(CameraShaker.Presets.RoughDriving)
h.WalkSpeed = 5
beep = true
repeat
HM += 1
barrageEffect:FireServer(1)
damage:FireServer(stand:FindFirstChild("Stand Right Arm"),.3,shrp.PunchHit2)
damage:FireServer(stand:FindFirstChild("Stand Left Arm"),.3,shrp.PunchHit2)
wait(.1)
until HM == 60 or beep == false
active = false
Barrage:Stop(.1,1,1)
h.WalkSpeed = 16
elseif k.KeyCode == Enum.KeyCode.R and ChopCooldown == false and appeared == true then
ChopCooldown = true
active = true
shrp.Chop:Play()
camShake:Shake(CameraShaker.Presets.RoughDriving)
h.WalkSpeed = 5
Chop:Play(.1,1,1)
wait(.1)
damage:FireServer(stand:FindFirstChild("Stand Right Arm"),10,shrp.PunchHit1)
Chop.Stopped:Wait()
h.WalkSpeed = 16
active = false
wait(1)
ChopCooldown = false
elseif k.UserInputType == Enum.UserInputType.MouseButton1 and appeared == true and lmbCD == false then
lmbCount += 1
active = true
lmbCD = true
if lmbCount == 1 then
lmb1:Play(.1,1,1)
camShake:Shake(CameraShaker.Presets.RoughDriving)
wait(.15)
damage:FireServer(stand:FindFirstChild("Stand Right Arm"),5,shrp.PunchHit2)
wait(.1)
active = false
wait(.5)
lmbCD = false
elseif lmbCount ==2 then
lmb2:Play(.1,1,1)
camShake:Shake(CameraShaker.Presets.RoughDriving)
wait(.15)
damage:FireServer(stand:FindFirstChild("Stand Left Arm"),5,shrp.PunchHit2)
wait(.1)
active = false
lmbCount = 0
wait(.5)
lmbCD = false
end
elseif k.KeyCode == Enum.KeyCode.T and KnifeCoolDown == false then
knifeThrow:Play()
camShake:Shake(CameraShaker.Presets.RoughDriving)
h.WalkSpeed = 5
KnifeCoolDown = true
active = true
wait(.35)
game.ReplicatedStorage.Knife:FireServer(30--[[ Damage ]], 100--[[ Velocity ]])
knifeThrow.Stopped:Wait()
h.WalkSpeed = 15
active = false
wait(3)
KnifeCoolDown = false
end
end)
uis.InputEnded:Connect(function(k,chat)
if chat then return end
if k.KeyCode == Enum.KeyCode.E then
beep = false
end
end)
Or if you dont wanna overwrite just get the parts that will support it.
ended up like this for me
https://gyazo.com/603b6986e942742f59c6f19cedcea414