Im making a part spin around my torso (Or it should) But I keep getting this error VVVV
attempt to multiply a Vector3 with an incompatible value type or nil
Im not sure why because from what I can see it should not a value type or nil.
Any ideas?
GetTable=function(tablename,plr) local NewTable={} table.foreach(tablename,function(i,v) if (v.Plr==plr.userId) then for _,b in pairs(v.PlrTablets) do table.insert(NewTable,b) table.sort(NewTable) end end end) Run.Heartbeat:wait() return NewTable end, RotateTablets=function() spawn(function() for _,plr in pairs(game.Players:GetPlayers()) do local PlayerTablets={} table.foreach((TA.Functions.GetTable(TA.Ranked,plr)),function(i,v) if not (v.Tab) then table.remove(i.PlrTablets,i) else table.insert(PlayerTablets,i) end local SpinParent=plr.Character.Torso.CFrame.p local Radius1 = CFrame.new(0,math.sin(tick()),-3.35-#PlayerTablets) local rad = math.rad(i*(360/#PlayerTablets)) local cfr = SpinParent*CFrame.Angles(0,rad,0)*Radius1 -- ERROR HERE local Pos = v.Tab.CFrame.p Pos = Pos:Lerp(cfr.p,.6) v.Tab.CFrame = CFrame.new(Pos) --*v.Tab.CFrame v.Tab.CFrame = v.Tab.CFrame*CFrame.Angles(.1,.1,.1) end) end end) end
The variable Radius1 is a CFrame object. You can only multiply numbers together.