Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My model won't move I want it to constantly move bu it doesn't move at all?

workspace.Road.PrimaryPart = workspace.Road.Center

while true do for i = 1,100 do wait(0.01)

	workspace.Road.SetPrimaryPartCFrame(CFrame.new(workspace.Road.PrimaryPart.Position + Vector3.new(0,0,1)))
end
	
wait(0.01)
	for i = 1,1 do
	wait(0.01)
	
	workspace.Road.SetPrimaryPartCFrame(CFrame.new(workspace.Road.PrimaryPart.Position + Vector3.new(0,0,-100)))

end
wait(0.01)

end

1 answer

Make sure your part isn't anchored.

That's because you have to add a Colon on :SetPrimaryPartCFrame this is because it is an inbuilt function that as the name suggest it moves parts to a certain position.

If you want it to do it continuously add a while loop

while true do
wait(1)
    workspace.Road.SetPrimaryPartCFrame(CFrame.new(workspace.Road.PrimaryPart.Position + Vector3.new(0,0,1)))
end


    workspace.Road.SetPrimaryPartCFrame(CFrame.new(workspace.Road.PrimaryPart.Position + Vector3.new(0,0,-100)))

end
wait(0.01)

This discussion is preserved as it was. New answers, comments, and votes are closed.