1. [2:53] Here you are using while wait() do
. It really is a bad practice and you should avoid using it (especially in beginner tutorials, newbies will think that it is a nice shortcut to write a while loop like this and will start to most likely use it).
A proper way of writing a while wait()
loop is:
while true do
wait();
end
However using wait()
is not effective as well. If you don’t know why, you can read more here. But in short: You should always use different functions that wait for certain events to happen such as :Wait
(Heartbeat:Wait()
), WaitForChild
etc…
2. [4:28, 4:48] It’s worth mentioning that math.random
is not actually random. It’s a pseudo-random generator, meaning that it’s based on the previous output and as stated here for JavaScript: “random though they might seem, those numbers will eventually repeat and reveal a non-random pattern.” You can read more about it in this website, since it’s a pretty interesting article overall and even mentions one of the algorithms for generating a pseudo-random number.
3. [13:26] You’re calling the GetService method each time a new for x
loop begins. This might hurt the performance, so it would be better if you have defined RunService at the top of your script and then used that variable to access Heartbeat.
4. [17:11] math.random
does not work with negative and math.huge
numbers. With the arguments of -math.huge, math.huge
it will always output -2147483648
:
To generate a seed more effectively, you could use
math.random() * 1E14
for example.
5. [24:51] fromRGB
takes integers so this line is incorrect. Instead of multiplying the values by 255 all you want to do is to use new
: Color3.new(0.8, 0.8, 0.8)
. Another alternative would be to use HSV although not really preferred: Color3.fromHSV(0, 0, 0.8)
(third parameter is Value - our brightness). You did use Color3.new
a few seconds later into the video though so good job.
also please change your script editor font to monospace when making these tutorials, I’m sure it doesn’t hurt only my eyes and it will just be easier to read the code, thanks
So with that in mind, I think you could be a successful youtuber! As others have pointed out it’s fun to watch your videos, and if you keep uploading good content like this I am sure you will get hundreds of subscribers.
Good luck!