hi
For some reason, my code is literally finding reasons to break when i try to add / multiply any number over 999. Does anybody know how to solve this? Because i checked and all the code seems correct but its just finding lines and telling it that its broken and i have NO idea how to solve this.
code segment.
emotes.special.OnServerEvent:Connect(function(plr)
--local special2 = char:WaitForChild("Humanoid"):FindFirstChildOfClass("Animator"):LoadAnimation(Animations.rusher)
--special2:Play()
char = plr.Character
charTorso = char:WaitForChild("Torso")
local sound = Sounds.whip2:Clone()
sound.Parent = workspace[""]
sound:Play()
sound.Ended:Connect(function()
sound:Destroy()
end)
local hitbox = VFX["3D"].hitbox
fakehit = hitbox:Clone()
fakehit.Parent = workspace[""]
local fakeweld = Create("Weld",fakehit)
fakeweld.Part0 = char:WaitForChild("HumanoidRootPart")
fakeweld.Part1 = fakehit
fakeweld.C0 = CFrame.new(0,0,-4)
paramas = OverlapParams.new()
paramas.FilterType = Enum.RaycastFilterType.Exclude
paramas.RespectCanCollide = true
local a = workspace:GetPartBoundsInBox(fakehit.CFrame, fakehit.Size,paramas)
for i,v in ipairs(a) do
local enemy = v.Parent
local enemyhum = enemy:FindFirstChildOfClass("Humanoid")
local torso = enemy:FindFirstChild("Torso")
local attachment = Create("Attachment",torso)
local circle1 = VFX["2D"].heavyhit.Circle1:Clone()
circle1.Parent = attachment
circle1:Emit(1)
local circle2 = VFX["2D"].heavyhit.Circle2:Clone()
circle2.Parent = attachment
circle2:Emit(1)
local line = VFX["2D"].heavyhit.Line:Clone()
line.Parent = attachment
line:Emit(1)
local sparkles = VFX["2D"].heavyhit.Sparkles:Clone()
sparkles.Parent = attachment
sparkles:Emit(20)
local WLine = VFX["2D"].heavyhit.WLine:Clone()
WLine.Parent = attachment
WLine:Emit(1)
--local res1 = VFX["2D"].heavyhit["residue (20)"]:Clone()
--res1.Parent = attachment
--res1:Emit(20)
--local res2 = VFX["2D"].heavyhit["residue (20) 2"]:Clone()
--res2.Parent = attachment
--res2:Emit(20)
--local sparks = VFX["2D"].heavyhit["sparks (20)"]:Clone()
--sparks.Parent = attachment
--sparks:Emit(20)
local velocity = Create("BodyVelocity",char:WaitForChild("HumanoidRootPart"))
velocity.Velocity = Vector3.new(0,0,humanoidRoot.CFrame.LookVector.Z * 50)
velocity.MaxForce = Vector3.new(900000000000000,900000000000000,900000000000000)
if enemyhum then
enemyhum:TakeDamage(7)
local sound = Sounds.impacts.impact3:Clone()
sound.Parent = workspace[""]
sound:Play()
sound.Ended:Connect(function()
sound:Destroy()
end)
local hit = enemyhum:FindFirstChildOfClass("Animator"):LoadAnimation(Animations.impact)
hit:Play()
end
wait(0.1)
attachment:Destroy()
end
wait(0.05)
fakeweld:Destroy()
fakehit:Destroy()
wait(0.1)
end)