This is my code that has 185 lines but line 44 never works.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Folder1 = ReplicatedStorage.Parry
local SuccessParry = Folder1.SuccessParry
local ErrorParry = Folder1.ErrorParry
local Folder2 = ReplicatedStorage.SpecificPlayer
local SpecificPlayerEvent = Folder2.SpecificPlayerEvent
local Folder3 = script.ParryParts
local Inner = Folder3.Inner
local Outer = Folder3.Outer
local ParryModuleScript = {}
local ParryProfiles = {}
local ParryNumber = 0
local ParryRunning = {}
local ParrySettings1 = 1
local Players = game:GetService("Players")
local P1A = script.Parry1Attempt
local P1S = script.Parry1Success
function ParryRequest4(Player,ParryProfile,Part)
while ParryProfile[3] == true do
task.wait(0.25)
Part.TweenSpeed.Value = math.clamp(Part.TweenSpeed.Value - 0.050,0.1)
end
end
function ParryRequest3(Player,ParryProfile,Part)
task.spawn(ParryRequest4,Player,ParryProfile,Part)
while ParryProfile[3] == true do
task.wait()
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(
Part.TweenSpeed.Value,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In
)
local NewProperty = {Position = Player.Character.Inner.Position}
local Tween = TweenService:Create(
Part,
Info,
NewProperty
)
Tween:Play()
end
end
--This function wont work
function ParryRequest2(Player,ParryProfile,RecordedParryNumber)
while ParryRunning[RecordedParryNumber] == true do
task.wait()
for Index_1,Value_1 in pairs(game:GetService("Workspace"):GetPartsInPart(Player.Character.Outer)) do
if Value_1.Parent == game:GetService("Workspace").RoundParts and Value_1.Name == "RoundPart" then
if Value_1.PlayerOne.Value == Player.UserId and Value_1.TweenPlayer.Value == Player.UserId then
local PlayerTwoParryProfile = nil
for Index_2,Value_2 in pairs(Players:GetChildren()) do
if Value_1.PlayerTwo.Value == Value_2.UserId then
for Index_3,Value_3 in pairs(ParryProfiles) do
for Index_4,Value_4 in pairs(ParryProfiles[Index_3]) do
if Index_4 == 1 and ParryProfiles[Index_3][1] == Value_1.PlayerTwo.Value then
Value_1.TweenPlayer.Value = Value_2.UserId
ParryProfile[2] = true
SuccessParry:FireClient(Player)
ParryProfile[3] = false
PlayerTwoParryProfile = ParryProfiles[Index_3]
PlayerTwoParryProfile[3] = true
Value_1.TweenSpeed.Value = math.clamp(Value_1.TweenSpeed.Value - 0.125,0.1,5)
ParryRunning[RecordedParryNumber] = false
task.spawn(ParryRequest3,Value_2,PlayerTwoParryProfile,Value_1)
local AnimationTrack = Player.Character.Humanoid.Animator:LoadAnimation(P1S)
AnimationTrack:Play()
end
end
end
end
end
elseif Value_1.PlayerTwo.Value == Player.UserId and Value_1.TweenPlayer.Value == Player.UserId then
local PlayerOneParryProfile = nil
for Index_2,Value_2 in pairs(Players:GetChildren()) do
if Value_1.PlayerOne.Value == Value_2.UserId then
for Index_3,Value_3 in pairs(ParryProfiles) do
for Index_4,Value_4 in pairs(ParryProfiles[Index_3]) do
if Index_4 == 1 and ParryProfiles[Index_3][1] == Value_1.PlayerOne.Value then
Value_1.TweenPlayer.Value = Value_2.UserId
ParryProfile[2] = true
SuccessParry:FireClient(Player)
ParryProfile[3] = false
PlayerOneParryProfile = ParryProfiles[Index_3]
PlayerOneParryProfile[3] = true
Value_1.TweenSpeed.Value = math.clamp(Value_1.TweenSpeed.Value - 0.125,0.1,5)
ParryRunning[RecordedParryNumber] = false
task.spawn(ParryRequest3,Value_2,PlayerOneParryProfile,Value_1)
local AnimationTrack = Player.Character.Humanoid.Animator:LoadAnimation(P1S)
AnimationTrack:Play()
end
end
end
end
end
end
end
end
end
end
function ParryRequest1(Player,ParryProfile,RecordedParryNumber)
table.insert(ParryRunning,RecordedParryNumber,true)
task.spawn(ParryRequest2,Player,ParryProfile,RecordedParryNumber)
task.wait(ParrySettings1)
if ParryRunning[RecordedParryNumber] == true then
ParryRunning[RecordedParryNumber] = false
ErrorParry:FireClient(Player,false)
task.wait(ParrySettings1)
ParryProfile[2] = true
end
end
function ParrySystem_Action2(Player)
task.wait()
local NewInner = Inner:Clone()
local NewOuter = Outer:Clone()
while true do
task.wait()
pcall(function()
NewInner.Parent = Player.Character
NewOuter.Parent = Player.Character
NewInner.Position = Player.Character.HumanoidRootPart.Position
NewOuter.Position = Player.Character.HumanoidRootPart.Position
end)
end
end
ParryModuleScript.ParrySystem = function(Player,ActionNumber)
if ActionNumber == 1 then
local ParryProfileExists = nil
local ParryProfile1 = nil
for Index_1,Value_1 in pairs(ParryProfiles) do
for Index_2,Value_2 in pairs(ParryProfiles[Index_1]) do
if Index_2 == 1 and Value_2 == Player.UserId then
ParryProfileExists = true
ParryProfile1 = ParryProfiles[Index_1]
end
end
end
if ParryProfileExists == true then
if ParryProfile1[2] == true then
ParryProfile1[2] = false
ParryNumber += 1
task.spawn(ParryRequest1,Player,ParryProfile1,ParryNumber)
local AnimationTrack = Player.Character.Humanoid.Animator:LoadAnimation(P1A)
AnimationTrack:Play()
else
ErrorParry:FireClient(Player,true)
end
else
table.insert(ParryProfiles,{})
local ParryProfile2 = ParryProfiles[#ParryProfiles]
table.insert(ParryProfile2,1,Player.UserId)
table.insert(ParryProfile2,2,false)
table.insert(ParryProfile2,3,false)
ParryNumber += 1
task.spawn(ParryRequest1,Player,ParryProfile2,ParryNumber)
local AnimationTrack = Player.Character.Humanoid.Animator:LoadAnimation(P1A)
AnimationTrack:Play()
end
elseif ActionNumber == 2 then
task.spawn(ParrySystem_Action2,Player)
return true
elseif ActionNumber == 3 then
local ParryProfileExists = nil
for Index_1,Value_1 in pairs(ParryProfiles) do
for Index_2,Value_2 in pairs(ParryProfiles[Index_1]) do
if Index_2 == 1 and Value_2 == Player.UserId then
ParryProfileExists = true
end
end
end
if ParryProfileExists == false then
table.insert(ParryProfiles,{})
local ParryProfile = ParryProfiles[#ParryProfiles]
table.insert(ParryProfile,1,Player.UserId)
table.insert(ParryProfile,2,true)
table.insert(ParryProfile,3,false)
end
elseif ActionNumber == 4 then
print(4)
elseif ActionNumber == 5 then
print(5)
elseif ActionNumber == 6 then
print(6)
end
end
return ParryModuleScript
please help!