AudioTextToSpeech:LoadAsync() and AudioTextToSpeech.IsLoaded work perfectly as expected in studio, but not on the game servers:
- AudioTextToSpeech:LoadAsync() yields forever and never fires,
- AudioTextToSpeech.IsLoaded never sets.
Tested with the following server scripts:
local referencePart = workspace.Part
local AudioTextToSpeech = Instance.new('AudioTextToSpeech')
AudioTextToSpeech.VoiceId = '1'
AudioTextToSpeech.Text = 'This is the test.'
AudioTextToSpeech.Parent = referencePart
local result = AudioTextToSpeech:LoadAsync()
print(result)
if result ~= Enum.AssetFetchStatus.Success then
return
end
if not AudioTextToSpeech.IsLoaded then
AudioTextToSpeech:GetPropertyChangedSignal('IsLoaded'):Wait()
end
print(AudioTextToSpeech.IsLoaded)
AudioTextToSpeech:Play()
local referencePart = workspace.Part
local AudioTextToSpeech = Instance.new('AudioTextToSpeech')
AudioTextToSpeech.VoiceId = '1'
AudioTextToSpeech.Text = 'This is the test.'
AudioTextToSpeech.Parent = referencePart
AudioTextToSpeech:Play()
if not AudioTextToSpeech.IsLoaded then
AudioTextToSpeech:GetPropertyChangedSignal('IsLoaded'):Wait()
end
print(AudioTextToSpeech.IsLoaded)
Reproduction steps:
- Create and publish a place in studio or use an existing published place,
- Insert two server scripts in ServerScriptService with RunContext set to either Legacy or Server and use the code snippets provided above,
- Playtest the place in studio and then in game, notice how the script works in studio but not on the live server.
Expected behavior
AudioTextToSpeech and its properties should work the same on the production server as they do in studio.