Why aren't the bricks returning to their position?

Achieve

I want the bricks to return to their original position.

Issue

This works for a CFrame but when I try to revert it to the Orientation… it for some odd reason won’t work.

image

--Made By MillerrIAm, VersionQ & TerryMichaelBrunk
-------------Variables------------
local Event = game.ReplicatedStorage.ControlEvents.RotateLightsEvent
local MovementModule = require(game.ServerScriptService["Module Scripts | Lighting"].MovementModule)
local Enabled = false
local isRunning = false
local Num = 360
------------Main Script------------
Event.OnServerEvent:Connect(function(plr,Lights,Activate) 
	Enabled = not Enabled
	if Enabled then
		for x,v in ipairs (game.Workspace.VenueLights[Lights]:GetChildren()) do
			spawn(function()
				local c = v.Orientation --Issue Here
				repeat
					MovementModule.Tween(v,Vector3.new(v.Orientation.X,v.Orientation.Y + Num,-145),nil)
					wait(0.05)
				until Enabled == false
				v.Orientation = Vector3.new(c) --Issue Here
			end)
		end
	end
end)

Thank you for any help you can give me.

The variable c is already a Vector3 value, so you can just do
v.Orientation = c

I had that originally and it didn’t work… hence my attempt to change it.

Hmm… maybe put a wait() after the chunk of code sorrounded by spawn() to give the thread time to execute

Use CFrames instead. It is useful to read up on them.

Do this instead:

local c = v.CFrame  --CFrame stores position and orientation
...
v.CFrame = c            --there are other ways to do this if you don't want
v.Position = SomePosition --to change position, but I don't think this should be a big deal
                                 

I understand all of this but I strictly need to use the Orientation, nothing else…

The Wait did not fix the issue sadly.

Okay, here is another way to do it

local c = v.CFrame - v.Position
...
v.CFrame = c + v.Position

credit to

Sorry for the late reply.
Does the script run through the code fully? Try and debug the script by putting a couple prints in if you haven’t already, or try printing c to see if it stores the right value.

I have made a massive change to fix this issue, I removed the Tween System and reverted to the CFrame system I didn’t want to use.

Thank you but I’ve taken care of it… the issue was that the tween wasn’t stopping before the Position was to be fixed.