Hey developers!
Sorry for the vague title, but I’m sure once I finish explaining the issue, you’ll understand pretty well what I’m talking about.
I’m trying to make it so when the player loads into the game, individual letters will appear every 0.05 second, which already works. Every letter is in a folder labeled numerically in the order they should appear. Upon testing this in studio, only one letter seems to appear.
Here’s my code:
local items = script.Parent.Parent
local tweenservice = game:GetService('TweenService')
for _,folder in pairs(items:GetChildren()) do
if folder:IsA('Frame') then
for i = 1, #folder:GetChildren() do
local letter = folder[i]
local pos = letter.Position
letter.ImageTransparency = 1
letter.Position = letter.Position + UDim2.new(0,0,0.16,0)
task.wait(5)
while task.wait(0.05) do
tweenservice:Create(letter,TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Position = pos, ImageTransparency = 0}):Play()
end
end
end
end
the task.wait(5)
isn’t very important, it’s just to have the script wait when the game loads. It will be replaced with the character added and whatnot whenever I get around to it.
Here’s what happens: Aftermath
Here’s what’s supposed to happen: Preferred Outcome
The issue is happening when it loops through the items numerically and I’m not entirely sure how to fix this. I’ve already looked through some resources and couldn’t find a solution.
Any help would be greatly appreciated!