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

Is it possible to make the for loop run and go faster?

for i = 1, 90 do		
	wait(.01)		
	if i <= 35 then
		gomuArm.Size = gomuArm.Size - Vector3.new(0, .5, 0)
	else
		gomuArm.Size = gomuArm.Size + Vector3.new(0, .5, 0)
	end
	gomuWeld.C1 = gomuWeld.C1 * CFrame.new(0.239, -0.016, 0.072)
end

Is it possible to make this loop go faster? I tried to wait(.001), but it doesn't seem it works. Any advice and assistance?

2 answers

✓ Accepted answer

The shortest time that wait() allows is .033 seconds. Use RunService.RenderStepped:Wait() or Heartbeat:Wait() to decrease that time to about .016 seconds

Howdy!

Short Answer: Not really.

Long Answer: Probably but not with Roblox. You're asking to speed communications from the client to the server then back to the clients. You COULD probably change the game settings in Roblox Studio through File > Settings but I've never touched those nor trusted myself to do so. I could be wrong, but who knows?

If this helped you out, consider accepting this answer for those sweet, sweet reputation points. If not, comment below and I (or someone else) will help you out.

Be sure to check out the Roblox API Documentation as well for additional reference.

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