game.ReplicatedStorage.SendText.OnClientEvent:Connect(function(text)
script.Parent.Visible = true
for i = 1, #text do
script.Parent.Ticker.Text = string.sub(text, 1, i)
SS.TextWriting:Play()
wait(0.04) --This is the speed of the text
end
end)
But i dont know how to detect once it is done doing all the typewriting effect
Do you have any idea on where I could start on how to fix this?
game.ReplicatedStorage.SendText.OnClientEvent:Connect(function(text)
script.Parent.Visible = true
for i = 1, #text do
script.Parent.Ticker.Text = string.sub(text, 1, i)
SS.TextWriting:Play()
wait(0.04) --This is the speed of the text
end
-- Stops right here
end)
If you want your client script to yield until the server has finished doing it’s task you can look into using a remote function instead of a remote event. Remote functions work differently compared to remote events as the client waits for the server to finish its function before continuing.