I want to make something of this kind: the example, however I do not understand how to grab an index through each character list and take only 1 random number and place it instead of a character.
However: I am getting an error that says:
Here’s my script:
local ObfuscatorList = {}
local Characters = "ABCEFGHIJKLMNOPQRSTUVWYZabcefghijklmnopqrstyvwyz1234567890!@#$%^&*()_+`~<>|{}[];:"
function ObfuscatorList.Obfuscator(GuiObject, TextLabel, DelayBetweenChars)
GuiObject.Visible = true
local Text = TextLabel
local Length = GuiObject.Text
GuiObject.Text = Text
local CharacterIndex = 0
for first, last in utf8.graphemes(Text) do
CharacterIndex += 1
local RandomIndex = math.random(0, string.len(Characters))
local i = 0
print("RandomIndex")
GuiObject.Text = string.find(Characters, RandomIndex, string.len(Length), true)
GuiObject.MaxVisibleGraphemes = CharacterIndex
wait(DelayBetweenChars)
end
end
return ObfuscatorList
You can’t call Random like a function. If you are trying to generate a random number between minimum and maximum number, you can call math.random instead.
Also, what are you exactly trying to put in Text.Text?
When getting the length of a string, you have to use string.len instead of Characters.len
It’s not a function within the instance, so your code should look like this: