Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

chat with a bot with a chat command?

Asked by 3 years ago
Edited 2 years ago

hello, im doing a bot named Nimble that can do tons of things when u say it by chat commands, for example, "Nimbles dance" <i have that and it works, all works perfectly and i can make it attack and other things but, i want to do a command for that u say "Nimbles say message [message here]" but its the only that has a different thing that i cant do,

heres my script:

function chat(messagegoeshere) local message=messagegoeshere game:GetService("Chat"):Chat(nimbles.Head, message, Enum.ChatColor.Red) --[[ that thing that says "nimbles.Head" is taht i local before "nimbles" that is the parent of the script that is inside of the bot --]] end

if string.find(msg,"say message") then chat() end --[[ here it says "msg."say message"" thats for msg in my script = the entity name to it will be like "Nimbles say message" " --]]

my script uses the functions to activate them and the functions works but i cant do this of the chat

but when i try to use that like: "say message MESSAGE EXAMPLE" i get this error and its impossible to fix my error is: argument 2 missing or nil.

will prob never be answered.

1 answer

Log in to vote
0
Answered by 2 years ago

sorry, i already got my answer. me say Nimbles:TEXT and it says it. my problem is that it says the whole text, for example if i do /e Nimbles:TEXT nimbles will say "/e nimbles:TEXT" so its the full msg

Ad

Answer this question