Copy salient and essential scripts and models from Plane Building Roblox
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
local module = {}
|
||||
|
||||
function module.new(this,speaker,context)
|
||||
this.main = _G.GetInstance(speaker,"Main")
|
||||
this.tts = _G.GetInstance(this.main,"AudioTextToSpeech")
|
||||
end
|
||||
|
||||
function module.replicate(this,speaker,context,value)
|
||||
this.tts.Text = tostring(value or "") or ""
|
||||
if _G.IsClient then
|
||||
if this.tts.IsPlaying then return end
|
||||
this.tts:Play()
|
||||
end
|
||||
end
|
||||
|
||||
module.messages = {
|
||||
default = function(this,speaker,context,value)
|
||||
context.replicate(this,speaker,module,value)
|
||||
end
|
||||
}
|
||||
|
||||
module.manifest = {
|
||||
"Speaker"
|
||||
}
|
||||
|
||||
return module
|
||||
Reference in New Issue
Block a user