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

What would YOU do to fix a script with no errors at all but you used the print method to debug?

Asked by 7 years ago
Edited 7 years ago

This is my script;

local maxhealth = script.Parent:WaitForChild("MaxHealth")
local cardlevel = script.Parent.Parent.Parent.CardLevel:WaitForChild("CardLv")
local healthadded = false

cardlevel.Changed:connect(function(Value)
    if healthadded == false and cardlevel.Value == cardlevel.Value + 1 then
        maxhealth.Value = maxhealth.Value + (cardlevel.Value * 2)
        wait(0.5)
        healthadded = true
    else
        if healthadded == true then
            return
        end
    end
end)

There are no errors but if you need the output;

15:10:33.104 - Future Game Leak was auto-saved to C:/Users/BlackOrange3343/Documents/ROBLOX/AutoSaves/Place_AutoSave_40.rbxl
Ragdoll Physics Loaded
Hello world!
15:10:37.506 - Humanoid is not a valid member of Script
15:10:37.508 - Stack Begin
15:10:37.509 - Script 'Plugin_144773946.RealRagdoll.Ragdoll', Line 4
15:10:37.511 - Stack End
Loading Cutscene Editor...
Bouyer's Ragdoll Physics Loaded
Finished Loading.
Loading Tree Gen...
Finished Loading Tree Gen
15:10:38.865 - Unable to load plugin icon. (x2)
Realism Mod is running on v1.795!
Cutscene Editor Loaded
activated is now true
43
found nothing
43
activated is now true
32
Found something
Hello world!
0
We explained exactly what was wrong on Discord. Also, name your question what you actually want to know. The title of this question is bad. Kampfkarren 215 — 7y
0
You should read the Output error... TheeDeathCaster 2368 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

It says if cardlevel.Value == cardlevel.Value+1 The value can't equal itself plus one so the code won't run.

1
We've told him this multiple times on Discord, he never listened. Kampfkarren 215 — 7y
Ad

Answer this question