Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

(Again) attempt to perform arithmetic (div) on nil and number ? line 2

Asked by 2 years ago
                local divide = 1
        if hum.Health > Config.damage / divide * 2 then
                    hum:TakeDamage(Config.damage / divide)
                else
                    if hum.Parent:FindFirstChild("HumanoidRootPart") then 
                        if not ReplicatedStorage:WaitForChild("CharStats"):FindFirstChild(hum.Parent.Name).Downed.Value then
                            if Players:GetPlayerFromCharacter(hum.Parent) then
                                ReplicatedStorage:WaitForChild("Events"):WaitForChild("FT"):FireClient(Players:GetPlayerFromCharacter(hit.Parent), hit, (Vector3.new(0, 2, 0) + Player.Character.HumanoidRootPart.CFrame.LookVector) * (Config.ShoveForce or 3000) / 2, 0.1, Vector3.new(5, 5, 5))
                            else
                                local v88 = Instance.new("BodyForce");
                                v88.Force = (Vector3.new(0, 1, 0) + Player.Character.HumanoidRootPart.CFrame.LookVector) * (Config.ShoveForce or 3000) / 2;
                                v88.Parent = hum.Parent.Torso;
                                game.Debris:AddItem(v88, 0.1);
                                hum.Parent.HumanoidRootPart.RotVelocity = Vector3.new(5, 5, 5)
                            end
                        end
                    end

-- im really bad at scripting :p --

0
Config.damage variable does not exist but i can't fix that, you need to find something like local Config = and work it out from there but you are "really bad at scripting" can't be helped imKirda 4491 — 2y
1
as a noob workaround between lines 1 and 2 you can type in `Config.damage = 10` or any other number you need but i don't know about the consequences imKirda 4491 — 2y

Answer this question