I was Making this tool and Script Analysis was giving me 0 Error and when I tried testing it out I got error Infinite Yield Possible on Players.Player.BackPack.Tool:WaitForChild(“ServerControl”)
BaseBat.Torso.Anchored = true
BaseBat.Parent = game:GetService("Workspace")
ScaleModule.ScaleCharacter(BaseBat, 0.2, {ResizeModels = true})
BaseBat.Parent = nil
RbxUtility = LoadLibrary("RbxUtility")
Create = RbxUtility.Create
BaseUrl = "http://www.roblox.com/asset/?id="
Functions = require(script:WaitForChild("Functions"))
BatManagement = script:WaitForChild("BatManagement")
EffectFire = script:WaitForChild("EffectFire")
ParticleScript = script:WaitForChild("ParticleScript")
Grips = {
Unequipped = CFrame.new(0, -0.25, 0.6, 1, 0, 0, 0, 1, 0, 0, 0, 1),
Equipped = CFrame.new(0, -0.25, 0.6, 1, 0, 0, 0, 1, 0, 0, 0, 1),
}
Animations = {
Equip = {Animation = Tool:WaitForChild("Equip"), FadeTime = nil, Weight = nil, Speed = nil, Duration = nil},
Strike = {Animation = Tool:WaitForChild("Strike"), FadeTime = nil, Weight = nil, Speed = 1.75, Duration = 1.25},
Slash = {Animation = Tool:WaitForChild("Slash"), FadeTime = nil, Weight = nil, Speed = 2, Duration = 1.25},
DoubleSlash = {Animation = Tool:WaitForChild("DoubleSlash"), FadeTime = nil, Weight = nil, Speed = 1.25, Duration = 1.5},
JumpAttack = {Animation = Tool:WaitForChild("JumpAttack"), FadeTime = nil, Weight = nil, Speed = nil, Duration = 1.125},
Slice = {Animation = Tool:WaitForChild("Slice"), FadeTime = nil, Weight = nil, Speed = 2, Duration = 0.75},
Cut = {Animation = Tool:WaitForChild("Cut"), FadeTime = nil, Weight = nil, Speed = 2, Duration = 1},
SpinSlash = {Animation = Tool:WaitForChild("SpinSlash"), FadeTime = nil, Weight = nil, Speed = 2.25, Duration = 0.75},
}
Sounds = {
Unsheath = Handle:WaitForChild("Unsheath"),
Swipe1 = Handle:WaitForChild("Swipe1"),
Swipe2 = Handle:WaitForChild("Swipe2"),
Swipe3 = Handle:WaitForChild("Swipe3"),
Swipe4 = Handle:WaitForChild("Swipe4"),
Hit = Handle:WaitForChild("Hit"),
}
Damages = {
Touch = 4,
Slash = 20,
}
CurrentDamage = Damages.Touch
BasePart = Create("Part"){
Material = Enum.Material.Plastic,
FormFactor = Enum.FormFactor.Custom,
TopSurface = Enum.SurfaceType.Smooth,
BottomSurface = Enum.SurfaceType.Smooth,
Size = Vector3.new(0.2, 0.2, 0.2),
Anchored = false,
CanCollide = true,
Locked = true,
}
Gravity = 196.20
Falling = false
JumpEnabled = true
ToolEquipped = false
Tool.Enabled = true
Tool.Grip = Grips.Unequipped
ServerControl = (Tool:FindFirstChild("ServerControl") or Create("RemoteFunction"){
Name = "ServerControl",
Parent = Tool,
})