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

attempt to perform arithmetic on global 'cbtcur1' (a table value) help?

Title explains it all. I do not know how to solve the problem and the Roblox Forums didn't help, so here I am. Please help, because I need this ready for a friend by tomorrow.

cob=math.floor((#cbtcur1+#cbtcur2)/2)
	for i=1,cob do
		cb1=Instance.new("Part",SupportSeg)
		cb1.Name="CB1"
		if cbtcur1[i]<0 and cbtprev1[i]<0 then
		cb1.Size=Vector3.new(cbtcur1[i]-cbtprev1[i],.6,.6)
		cb1.Position=Vector3.new(cbtcur1-cbtprev1,cbtcury,cbtcurz)
		elseif cbtcur1[i]<0 and cbtprev1[i]<0 then
		cb1.Size=Vector3.new(cbtcur1[i]-cbtprev1[i],.6,.6)
		cb1.Position=Vector3.new(cbtcur1-cbtprev1,cbtcury,cbtcurz)
		else
		cb1.Size=Vector3.new(cbtcur1[i]+cbtprev1[i],.6,.6)
		cb1.Position=Vector3.new(cbtcur1+cbtprev1,cbtcury,cbtcurz)
	    end

6 comments

0

So, you want us to do the script that your friend wants you to make? Tell your friend to ask Scriptinghelpers.org, it's free.

0

That was just a very partial part of the code by the way.

0

I'm making this for me AND him actually. This is the absolute last thing I need to fix in the script before it's finished.

0

Any help please?

0

attempt to perform arithmetic means your trying to convert the value to a number. this error will show if the value is A) not a number or B) if you try to convert a string that is not only numbers

0

Are the tables filled with number values?

1 answer

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