Basically when the player presses the W key, I need a part to move forward a certain amount, then stop. When they press W again, it moves again, then stops... etc.

I'm currently changing it's CFrame, and it's resulting in some slight stutter/lag-back/blur effect.

Here is what I'm doing currently to move the brick:

for i = 1, 100 do   
	game.Workspace.Part.CFrame = game.Workspace.Part.CFrame + Vector3.new(0,0,-0.1)
	wait(waitTime)
end

Is there an alternative or more effective method to accomplish this without the slight blur/lag effect? If so, how can I go about doing it?

2 comments

0

define the part, e.g local part = game.Workspace.Part

0

Perhaps try changing this. Vector3.new(0,0,-0.1) to Vector3.new(0,0,-0.01), though the distance it travels is shorter.