Attempt to perform arithmetic (add) on string and number

Well, Im sure of it. But, this block specifically:

for i,v in pairs(Player.Pets:GetChildren()) do
		if v.Equipped.Value == true then
			Multi = Multi + v[multiplierName].Value
		end
	end

Player.Pets is a folder. Im sure of it. The Equipped if statement isn’t needed in the explination. So here is what we are focusing on:

Multi = Multi + v[multiplierName].Value

v[multiplierName] will search through that folder for something named whatever multiplierName is. These are either stringValues or intValues hence the

.Value

at the end.

Oh, ok. I think I see the line

In the getMultiplier() function on this line:

Multi = Multi + v[multiplierName].Value

change it to:

Multi = Multi + v[multiplierName].Value
print(v[multiplierName].ClassName)

Tell us what it prints.

Ah, turns out there was a problem with another script, thanks for helping though, I learned a lot from these types of problems!

No problem, glad I could help / provide some usefull information :slight_smile:

1 Like