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

How do I fix VALUE is not a valid member of NumberValue error?

This is my script;

local cardlevel = script.Parent.Parent.Parent.CardLevel:WaitForChild("CardLv")
local cardleveltext = script.Parent.Parent.Parent.CardLevel
local currentexp = script.Parent:WaitForChild("CurrentEXP")
local cardexptext = script.Parent
local levelbar = script.Parent.Parent:WaitForChild("EXPBar")
local expmax = script.Parent:WaitForChild("EXPMax")

cardexptext.Text = currentexp.Value.. " / "..expmax.Value

currentexp.Changed:connect(function(Value)
		cardexptext.Text = currentexp.Value.. " / "..expmax.Value
		local EXP = currentexp.Value / expmax.VALUE
		levelbar.Size = UDim2.new(currentexp.Value / expmax.Value, 0, 1, 0)
		if currentexp.Value >= expmax.Value then
			currentexp.Value = 0
			expmax.Value = expmax.Value + 50
			cardlevel.Value = cardlevel.Value + 1
	end
end)

This is my ENTIRE output;

14:53:52.317 - Future Game Leak was auto-saved to C:/Users/BlackOrange3343/Documents/ROBLOX/AutoSaves/Place_AutoSave_40.rbxl
Ragdoll Physics Loaded
Hello world!
14:53:55.684 - Humanoid is not a valid member of Script
14:53:55.685 - Stack Begin
14:53:55.687 - Script 'Plugin_144773946.RealRagdoll.Ragdoll', Line 4
14:53:55.688 - Stack End
Loading Cutscene Editor...
Bouyer's Ragdoll Physics Loaded
Finished Loading.
Loading Tree Gen...
Finished Loading Tree Gen
14:53:56.730 - Unable to load plugin icon. (x2)
Realism Mod is running on v1.795!
Cutscene Editor Loaded
Hello world!
activated is now true
79
found nothing
79
activated is now true
86
found nothing
86
activated is now true
40
found nothing
40
activated is now true
84
found nothing
84
activated is now true
12
Found something
14:54:44.275 - VALUE is not a valid member of NumberValue
14:54:44.278 - Stack Begin
14:54:44.281 - Script 'Players.Player1.PlayerGui.BattleGuiTest.BattleBackGround.PlayerCard.EXPFrame.CardEXP.LocalScript', Line 12
14:54:44.283 - Stack End

This is the error part of the output;

14:54:44.275 - VALUE is not a valid member of NumberValue
14:54:44.278 - Stack Begin
14:54:44.281 - Script 'Players.Player1.PlayerGui.BattleGuiTest.BattleBackGround.PlayerCard.EXPFrame.CardEXP.LocalScript', Line 12
14:54:44.283 - Stack End

This is the line of the error in script;

local EXP = currentexp.Value / expmax.VALUE

I don't know how to read errors or fix them, please help! Thank you all for any support.

2 answers

✓ Accepted answer

There is no such thing as .VALUE, only .Value. Lua is case-sensitive (meaning things of different CaPiTaLiZaTiOn act differently).

1 comment

0

Thanks

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