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

bad argument #2 to 'fromOrientation' (number expected, got no value) Whats going on?

Asked by 5 years ago

Hi. I keep getting Workspace.Folder.Script:27: bad argument #2 to 'fromOrientation' (number expected, got no value) in the output coming from my script. What's going on?

Code: ```Lua local tweenService = game:GetService("TweenService")

local sp = script.Parent

local a1 = sp.Pillar1A

local a2 = sp.Pillar2A

local a3 = sp.Pillar3A

local a4 = sp.Pillar4A

local a5 = sp.Pillar5A

local b1 = sp.Pillar1B

local b2 = sp.Pillar2B

local b3 = sp.Pillar3B

local b4 = sp.Pillar4B

local b5 = sp.Pillar5B

local sound = sp.Sounder.Sound

local delayTime = 5 -- time before repetition

local delay2 = 2 -- time before reverse

local tweeningInfo = TweenInfo.new(

2.21, -- Duration

Enum.EasingStyle.Linear, -- EasingStyle

Enum.EasingDirection.Out, -- EasingDirection

0, -- Repetition Count

false, -- Reverses

0 -- Delay

)

local a1Close = {CFrame = (CFrame.new(-94.125, 24.905, 74.422) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b1Close = {CFrame = (CFrame.new(-94.125, 26.28, 74.422) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a2Close = {CFrame = (CFrame.new(-94.124, 24.905, 68.722) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b2Close = {CFrame = (CFrame.new(-94.125, 26.28, 68.722) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a3Close = {CFrame = (CFrame.new(-94.125, 24.905, 63.023) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b3Close = {CFrame = (CFrame.new(-94.125, 26.28, 63.022) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a4Close = {CFrame = (CFrame.new(-94.125, 24.905, 57.322) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b4Close = {CFrame = (CFrame.new(-94.125, 26.28, 57.322) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a5Close = {CFrame = (CFrame.new(-94.126, 24.905, 51.622) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b5Close = {CFrame = (CFrame.new(-94.125, 26.28, 51.622) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a1Open = {CFrame = (CFrame.new(-94.125, 27.991, 74.422) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b1Open = {CFrame = (CFrame.new(-94.125, 29.366, 74.422) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a2Open = {CFrame = (CFrame.new(-94.124, 27.991, 68.722) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b2Open = {CFrame = (CFrame.new(-94.125, 29.366, 68.722) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a3Open = {CFrame = (CFrame.new(-94.125, 27.991, 63.023) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b3Open = {CFrame = (CFrame.new(-94.125, 29.366, 63.022) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a4Open = {CFrame = (CFrame.new(-94.125, 27.991, 57.322) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b4Open = {CFrame = (CFrame.new(-94.125, 29.366, 57.322) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a5Open = {CFrame = (CFrame.new(-94.126, 27.991, 51.622) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local b5Open = {CFrame = (CFrame.new(-94.125, 29.366, 51.622) + CFrame.fromOrientation(Vector3.new(0, -90, 90)))}

local a1C = tweenService:Create(a1,tweeningInfo,a1Close)

local b1C = tweenService:Create(b1,tweeningInfo,b1Close)

local a2C = tweenService:Create(a2,tweeningInfo,a2Close)

local b2C = tweenService:Create(b2,tweeningInfo,b2Close)

local a3C = tweenService:Create(a3,tweeningInfo,a3Close)

local b3C = tweenService:Create(b3,tweeningInfo,b3Close)

local a4C = tweenService:Create(a4,tweeningInfo,a4Close)

local b4C = tweenService:Create(b4,tweeningInfo,b4Close)

local a5C = tweenService:Create(a5,tweeningInfo,a5Close)

local b5C = tweenService:Create(b5,tweeningInfo,b5Close)

local a1Cc = tweenService:Create(a1,tweeningInfo,a1Open)

local b1Cc = tweenService:Create(b1,tweeningInfo,b1Open)

local a2Cc = tweenService:Create(a2,tweeningInfo,a2Open)

local b2Cc = tweenService:Create(b2,tweeningInfo,b2Open)

local a3Cc = tweenService:Create(a3,tweeningInfo,a3Open)

local b3Cc = tweenService:Create(b3,tweeningInfo,b3Open)

local a4Cc = tweenService:Create(a4,tweeningInfo,a4Open)

local b4Cc = tweenService:Create(b4,tweeningInfo,b4Open)

local a5Cc = tweenService:Create(a5,tweeningInfo,a5Open)

local b5Cc = tweenService:Create(b5,tweeningInfo,b5Open)

while wait(delayTime) do

a1Cc:Play()

a2Cc:Play()

a3Cc:Play()

a4Cc:Play()

a5Cc:Play()

b1Cc:Play()

b2Cc:Play()

b3Cc:Play()

b4Cc:Play()

b5Cc:Play()

wait(delay2)

a1C:Play()

a2C:Play()

a3C:Play()

a4C:Play()

a5C:Play()

b1C:Play()

b2C:Play()

b3C:Play()

b4C:Play()

b5C:Play()

end ```

Answer this question