I have been trying to make a system for a train game I am working on. I have a system that generates a four-digit code to identify them.
local Code = math.random(1000,9999)
What I need is:
- Find two instances with the same Name, not what they are
- Leave the first one’s Name with the code already set
- Generate a new code for the second one’s Name