I’m making a script that places an image of a letter for each letter typed into a TextLabel. However, the script does nothing. Script and Explorer provided below.
local characters = {
["A"] = {11436216463, 6},
["B"] = {11436243733, 6},
["C"] = {11436295195, 6},
["D"] = {11436593663, 6},
["E"] = {11436607426, 5},
["F"] = {11436797194, 5},
["G"] = {11436897186, 6},
["H"] = {11436918806, 6},
["I"] = {11436928934, 2},
["J"] = {11436950442, 6},
["K"] = {11436957976, 6},
["L"] = {11436992416, 5},
["M"] = {11437140015, 7},
["N"] = {11437197549, 7},
["O"] = {11437211159, 6},
["P"] = {11437235006, 6},
["Q"] = {11437239090, 7},
["R"] = {11437249948, 6},
["S"] = {11437332392, 6},
["T"] = {11437382892, 6},
["U"] = {11437454737, 6},
["V"] = {11437469140, 7},
["W"] = {11437479428, 7},
["X"] = {11437484961, 7},
["Y"] = {11437524359, 6},
["Z"] = {11437534762, 6},
["a"] = {11437560815, 5},
[" "] = {0, 0}
}
local dotstaken = 0
script.Parent.TextBox:GetPropertyChangedSignal("Text"):Connect(function()
dotstaken = 0
local detectstring = string.split(script.Parent.TextBox.Text, "")
for i, v in pairs(detectstring) do
local new = Instance.new("ImageLabel")
new.Parent = script.Parent.Frame
new.BackgroundTransparency = 1
new.ScaleType = Enum.ScaleType.Crop
if characters[v][1] ~= 0 then
new.Image = "rbxassetid://" .. characters[v][1]
end
new.ImageColor3 = Color3.fromRGB(255, 170, 0)
new.Size = UDim2.new(0, characters[v][2]*10, 0, 90)
new.Position = UDim2.new(0, dotstaken*10, 0, 0)
dotstaken = dotstaken + characters[v][2] + 1
end
end)
After the script is run, I don’t see any new images being placed under Frame. I am already setting the parent of the new instance through the script.
Any help is appreciated.