I’m trying to make a part which moves and then instantly goes back to its original spot and does this forever. This is my current script for doing so:
while true do
for i= 1, 50 do
script.Parent.CFrame = CFrame.new(0,5,0)
end
for i= 1, 50 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.3,0,0)
task.wait()
end
end
The problem I’m having is that for some reason the part gets rotated when I run the project.
The part before running the project:
The part while running the project:
I’m not very knowledgeable with cframe stuff so if anyone knows what’s doing this and how to fix it that would be greatly appreciated.