Basically, I want the Part to move to that CFrame, then after 5 seconds, to come back. However, When Part Teleports Back, It also changed it's orientation, I tried to do
script.Parent.Orientation but it didn't work, anyone knows what's the issue?
local click = script.Parent.ClickDetector click.MouseClick:Connect(function(click) print("I got clicked") script.Parent.CFrame = CFrame.new(1273.907, 237.592, -668.21) wait(5) script.Parent.CFrame = CFrame.new(1284.227, 237.592, -668.21) end)
The issue is that CFrames contain orientation data. Creating a CFrame creates a blank orientation,(0,0,0
i think). Try using a part with the orientation and position u want:
local part = -- put the part with the desired end orientation and position. It should be transparent and cancollide-false. local click = script.Parent.ClickDetector click.MouseClick:Connect(function(click) print("I got clicked") script.Parent.CFrame = part.CFrame wait(5) script.Parent.CFrame = CFrame.new(1284.227, 237.592, -668.21) end)