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

(2 questions in 1 post) Blood GUI, thirst not working Why is that?

Asked by 9 years ago
01--kills player if he/she has no blood.
02function Check()
03if script.Parent.Value == 0 then
04    game.Players.LocalPlayer.Character.Humanoid.Health = 0
05end
06end
07 
08script.Parent.Changed:connect(Check)
09 
10--if bleeding is true, slowly take away
11script.Parent.Parent.Parent.BleedingGui.IsBleeding.Changed:connect(function()
12    print("u gon bleed to deth")
13        if script.Parent.Parent.Parent.BleedingGui.IsBleeding == true then
14            script.Parent.Parent.Parent.BleedingGui.TextLabel.Visible = true
15            for i = 1, script.Parent.Parent.Parent.BloodGui.Blood.Value do
View all 28 lines...

Above won't do anything if IsBleeding is set to true, and the GUI isn't keeping track of its Value. It seems as if "if" statements hate me :l

Below won't set IsBleeding to true, and the GUI isn't keeping track of the value (Like the BloodGui).

01--Player hunger/energy/thirst script made by Cyotokatrov
02 
03x = game.Workspace
04y = script.Parent
05 
06for i = 1, y.Thirst.Value do
07    wait(15)
08    y.Thirst.Value = y.Thirst.Value - 1
09    script.Parent.TextLabel.Text = "Thirst [" .. script.Parent.Thirst.Value .. "]"
10end
11 
12function a()
13if script.Parent.Thirst.Value == 0 then
14    print("u ded nao boi")
15    for i = 1, script.Parent.Parent.BloodGui.Blood.Value do
View all 25 lines...

Will screenshots of the error help?

Answer this question