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

Im trying to do a if (NumberValue here) <= 0 then but wont work without outputs?

Asked by 5 years ago
Edited 5 years ago

I get no error in the output or what im trying print

script.Parent.ClickDetector.MouseClick:Connect(function(player)
    if script.Parent.Parent.Hits.BillboardGui.Damage.Text == "0" then --Problem
        print("Event fire attempt")
        game.ReplicatedStorage.Logg:FireClient(player)
    end
    if script.Parent.Parent.Player.Value == "" then
        script.Parent.Parent.Player.Value = player.Name
    end
    if player.Name == script.Parent.Parent.Player.Value then
    print(player.Name)
    print("jwilenqgnblqnbw")
    local equiped = player.AxeLvl.Value
    player.Character.Humanoid:EquipTool(player.Backpack:FindFirstChild(equiped))
    wait(0.150)
    if equiped == "lvl1" then
    script.Parent.Parent.Hits.BillboardGui.Damage.Text = script.Parent.Parent.Hits.BillboardGui.Damage.Text - 5
    end
    script.Parent.Chop1:Play()
    script.Parent.Parent.Particles.ParticleEmitter.Enabled = true
    wait(0.2)
    script.Parent.Parent.Particles.ParticleEmitter.Enabled = false
    wait(0.2)
    local axe = player.Character:FindFirstChild(equiped):Clone()
    axe.Parent = player.Backpack
    player.Character:FindFirstChild(equiped):Destroy()
    end
end)
0
it obviously more than 0 HappyTimIsHim 652 — 5y
0
at line 16 u can't subtract things from text HappyTimIsHim 652 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You can't subtract numbers from a TextLabel, try making an IntValue, doing the subtracting on that then make the text of the TextLabel say whatever you want it to.

Ad

Answer this question