Im making some simple callouts for my game. The player will press a button giving them three options: Help, Thank you, and Warcry.
Players are given a randomized species. although the only current ones are Guest and Placeholder
the folder containing voicelines for their species is cloned into their character, which contains only string values for each callout and its variants.
i have a system in place where it will take the type of callout (Help, thank you, etc.) and itll trigger an event in the character to say the line
local chat = game:GetService("Chat")
local replic = game:GetService("ReplicatedStorage")
local char = script.Parent
local species = char.Species.Value
local voicelines = replic.StandingVoicelines[species]:Clone()
voicelines.Parent = char
script.RemoteEvent.OnServerEvent:Connect(function(plr, text)
local Head = char.Head
local type = voicelines[text]
local possiblemsgs = type:GetChildren()
local main = possiblemsgs(math.random(1, #possiblemsgs))
print(main.Name)
chat:Chat(Head, main.Value, 3)
end)
all i get is the error “Attempt to call table value”
any thoughts?