Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

2 comments

0

it obviously more than 0

0

at line 16 u can't subtract things from text

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.