Speaker Object
Methods
getPlayer
local speaker = API.speaker.cache("Player1")
print(speaker:GetPlayer())
This method will return a player object if the speaker is assigned to one.
addToChannel
local speaker = API.speaker.cache("Player1")
speaker:addToChannel("all")
This method will add the specified speaker to the specified channel object.
Type
Name
string
channel name
isinChannel
local speaker = API.speaker.cache("Player1")
speaker:addToChannel("all")
local isInChannel = speaker:isInChannel("all")
print(isInChannel)
This method will return a boolean that tells you if the speaker is in the specified channel object.
Type
Name
string
channel name
destroy
local speaker = API.speaker.cache("Player1")
speaker:Destroy()
This method will destroy all the connections of the specified speaker and remove their functions. This essentially is the same as destroying a part, it renders it useless.
Type
Name
string
speaker name
Last updated
Was this helpful?