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

Value is not a valid member of IntValue? Trying to decrease the value by 1.

I'm trying to make it so whenever I place an item down, 1 of said item is removed. However, it keeps saying that value is not a valid member of IntValue, even though I had just used it. This is what I have so far:

local function initiatePlacement(itemName)
	if gui.TowerAmount[itemName].value > 0 then
		
		cancelPlacement()
		dummyModel = items[itemName]:clone()
		currentItemName = itemName
		
		for _, object in pairs(dummyModel:GetChildren()) do
			if object.Name == "Hitbox" then
				object.CanCollide = false
			end
		end
	
		dummyModel.Parent = workspace

		local signal = plane:enable(dummyModel)

		signal:connect(function(location, _)
			game:GetService("ReplicatedStorage").ClientPlaced:FireServer(currentItemName, location[1])
			gui.TowerAmount[itemName].value = gui.TowerAmount[itemName].value - 1	
			cancelPlacement()
		end)
	end
end

Line 22 is where the issue is. Any help is appreciated!

2 answers

✓ Accepted answer

Lua is case sensitive, it is Value with a capital V

3 comments

0

No answer required, just comment lol.

0

what?

0

@unsatiesfie_d Why? because its short? its still an answer to the question he is asking

Its Value not value. There's some odd functions there? ????

3 comments

0

why answer? just comment

0

why answer? just comment

0

because no u thats why

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