How to make a bezier barrage effect , i have a script here but idk how to use bezier , i tried so many way to make it work but i failed
local function BarrageVFX()
if player:FindFirstChild("Data"):FindFirstChild("SkinValue").Value ~= nil then
local value = player:FindFirstChild("Data"):FindFirstChild("SkinValue").Value
local findskinmodel = game:GetService("ServerStorage").StandModel.TheWorld:FindFirstChild(value)
if findskinmodel then
local Stands = findskinmodel:Clone()
local StartXR = math.random(-150,150)/100
local StartXL = math.random(-150,150)/100 * -1
local StartYR = math.random(-150,150)/100
local StartYL = math.random(-150,150)/100
local LeftArmModel = Instance.new("Model")
LeftArmModel.Name = "LeftArm"
LeftArmModel.Parent = game.Workspace
local LLA = Stands:FindFirstChild("LeftLowerArm"):Clone()
LLA.Parent = LeftArmModel
local LUA = Stands:FindFirstChild("LeftUpperArm"):Clone()
LUA.Parent = LeftArmModel
local LH = Stands:FindFirstChild("LeftHand"):Clone()
LH.Parent = LeftArmModel
local weld1 = Instance.new("WeldConstraint")
weld1.Part0 = LH
weld1.Part1 = LLA
weld1.Parent = LH
local weld2 = Instance.new("WeldConstraint")
weld2.Part0 = LUA
weld2.Part1 = LLA
weld2.Parent = LUA
LeftArmModel.PrimaryPart = LLA
LeftArmModel.PrimaryPart.Anchored = true
local attachment1 = IMPORTANTFOLDER.BarrageEffect.Attachment1:Clone()
attachment1.Parent = LUA
local attachment2 = IMPORTANTFOLDER.BarrageEffect.Attachment2:Clone()
attachment2.Parent = LUA
LeftArmModel.PrimaryPart.CFrame = CFrame.new(char.PrimaryPart.CFrame * CFrame.new(StartXL,StartYL,-1.5).p,char.PrimaryPart.CFrame * CFrame.new(StartXL * .4,StartYL * .4,-8).p) * CFrame.Angles(math.rad(90),0,0)
local RightArmModel = Instance.new("Model")
RightArmModel.Name = "LeftArm"
RightArmModel.Parent = game.Workspace
local RLA = Stands:FindFirstChild("RightLowerArm"):Clone()
RLA.Parent = RightArmModel
local RUA = Stands:FindFirstChild("RightUpperArm"):Clone()
RUA.Parent = RightArmModel
local RH = Stands:FindFirstChild("RightHand"):Clone()
RH.Parent = RightArmModel
local weld1 = Instance.new("WeldConstraint")
weld1.Part0 = RH
weld1.Part1 = RLA
weld1.Parent = RH
local weld2 = Instance.new("WeldConstraint")
weld2.Part0 = RUA
weld2.Part1 = RLA
weld2.Parent = RUA
RightArmModel.PrimaryPart = LLA
RightArmModel.PrimaryPart.Anchored = true
local attachment1 = IMPORTANTFOLDER.BarrageEffect.Attachment1:Clone()
attachment1.Parent = RUA
local attachment2 = IMPORTANTFOLDER.BarrageEffect.Attachment2:Clone()
attachment2.Parent = RUA
RightArmModel.PrimaryPart.CFrame = CFrame.new(char.PrimaryPart.CFrame * CFrame.new(StartXR,StartYR,-1.5).p,char.PrimaryPart.CFrame * CFrame.new(StartXL * .4,StartYL * .4,-8).p) * CFrame.Angles(math.rad(90),0,0)
local infronttween = TweenService:Create(RightArmModel.PrimaryPart,TweenInfo.new(.15),{CFrame = LeftArmModel.PrimaryPart.CFrame * CFrame.new(0,-3.5,math.random(-1.5,1.5))})
infronttween:Play()
infronttween.Completed:Connect(function()
for i , v in pairs(LeftArmModel:GetDescendants()) do
if v:IsA("Texture") or v:IsA("BasePart") or v:IsA("Decal") then
v.Transparency = 0
local invistween = TweenService:Create(v,TweenInfo.new(.5),{Transparency = 1})
invistween:Play()
invistween.Completed:Connect(function()
LeftArmModel:Destroy()
end)
end
end
end)
local infronttweens = TweenService:Create(RightArmModel.PrimaryPart,TweenInfo.new(.15),{CFrame = RightArmModel.PrimaryPart.CFrame * CFrame.new(0,-3.5,math.random(-1.5,1.5))})
infronttweens:Play()
infronttweens.Completed:Connect(function()
for i , v in pairs(RightArmModel:GetDescendants()) do
if v:IsA("Texture") or v:IsA("BasePart") or v:IsA("Decal") then
v.Transparency = 0
local invistween = TweenService:Create(v,TweenInfo.new(.5),{Transparency = 1})
invistween:Play()
invistween.Completed:Connect(function()
RightArmModel:Destroy()
end)
end
end
end)
end
end
end