I’m having problem with this function giving the error above
local function typeText(label, msg, typeTime, color, strokeColor)
if color then
Objective.TextColor3 = color
end
if strokeColor then
Objective.UIStroke.Color = strokeColor
end
for i=1, #msg do
sceneGui.BackFrame[label].Text = string.sub(msg, 1, i)
wait(typeTime / #msg)
end
end
local function typeText(label, msg, typeTime, color, strokeColor)
if color then
Objective.TextColor3 = color
end
if strokeColor then
Objective.UIStroke.Color = strokeColor
end
msg = tostring(msg)
for i=1, #msg do
sceneGui.BackFrame.Objective[label].Text = string.sub(msg, 1, i)
wait(typeTime / #msg)
end
end
That just means that msg is a variable reference to a number type value.
The unary length operator which is denoted by the hash key “#” can only be used to ascertain the lengths of strings (number of characters) or size of tables (number of items).
As has been suggested, you can coerce a number value into a string value by passing it as an argument to the tostring() global function.
Regarding your second issue, the frame object named “BackFrame” does not contain a child frame object named “Objective”.