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

error "attempt to call a string value" on line 18?[SOLVED]

Asked by 4 years ago
Edited 4 years ago
local posthree = {}
posthree.X = 2
posthree.Y = 0
posthree.Z = 0

local rthree = {}
rthree.X = 0
rthree.Y = 0
rthree.Z = 0

local x3 = posthree.X
local y3 = posthree.Y
local z3 = posthree.Z
local rx3 = rtree.X
local ry3 = rtree.Y
local rz3 = rtree.Z

local x2 = ((math.cos(math.pi(rx3/180))*x3)  +  (math.sin(math.pi(ry3/180))*x3)  +  (math.sin(math.pi(rz3/180))*x3))

So apperently using math.pi you must use a sign before or after it


local x2 = ((math.cos(math.pi*((rx3/180))*x3) + (math.sin(math.pi*(ry3/180))*x3) + (math.sin(math.pi*(rz3/180))*x3))

Answer this question