I am trying to make a simple union change oirentation and position but when I run the code I get the error "Attempt to call a userdata value,line 9". Any ideas?
local TweenService = game:GetService("TweenService") local debounce = false local MovingDoor = script.Parent.Parent.MovingDoor local TweenOpen = TweenService:Create(MovingDoor, TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0) {Position = Vector3.new(410.859, 74.142, 19.051), Orientation = Vector3.new(0, 135, 90)} ) TweenOpen:Play()
Try something like this, I split the position and orientation into separate tweens and tweaked a bit of the tweens.
local TweenService = game:GetService("TweenService") local debounce = false local MovingDoor = script.Parent.Parent.MovingDoor local TweenPosition = TweenService:Create(MovingDoor, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Position = Vector3.new(410.859, 74.142, 19.051)}) local TweenOrientation = TweenService:Create(MovingDoor, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Orientation = Vector3.new(0, 135, 90)}) TweenPosition:Play() TweenOrientation:Play()