Im fairly new to coding right now, and I’m working on a dialog bubble. However just when I thought I did everything right, the chat started going in reverse!
Video:
As funny as this is, I kind of want to learn how to make it go the proper way.
I want it to go from the first letter all the way to the last*
Here’s my code:
function Chat (String)
local NumOfLetters = string.len(String)
print(NumOfLetters)
for i = 1,NumOfLetters do
local NEWSTRING= string.sub(String,i,NumOfLetters)
player.PlayerGui.ChatGUI.Frame.TextLabel.Text = NEWSTRING
wait(0.1)
end
end
game.ReplicatedStorage.Event.OnClientEvent:Connect(function(Key,String)
if Key == "Chat" then
Chat(String)
end
end)
Thanks for reading C: