(yes i know im not supposed to just send a screenshot like that im sorry)
acc = acc or 1
if n == 0 then
return acc
else
return factorial(n-1, n*acc)
end
end
print(factorial(5))
https://youtu.be/n07w-eabLMw?si=1wV5Va807LNb8-MZ&t=2216 code is from this vid at 36:54
Get The Roblox Scripting Fastlane (Paperback & Hardcover) [Free Sample on Amazon] → https://www.amazon.com/Roblox-Scripting-Fastlane-Coach/dp/B0F2J65QCW/
Discord Community: https://discord.gg/rqe6jEHHwR
0:00 | Intro
1:20 | Your First Script
1:50 | Comments
2:58 | Blocks
3:35 | Variable Identifiers
4:08 | Keywords
4:47 | Global Variables vs L...
** You are now Level 2! **