RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a chatbot using your api to awnser chat messages."
-- ScripterAI cannot directly integrate with Roblox, but here's a basic chatbot example using Roblox's Chat service local Chat = game:GetService("Chat") local Players = game:GetService("Players") local function onPlayerChatted(player, message) local response = "" if string.lower(message) == "hello" then response = "Hello, " .. player.Name .. "!" elseif string.lower(message) == "how are you?" then response = "I'm an AI chatbot, so I don't have feelings, but thank you for asking!" else response = "I'm not sure how to respond to that. Try asking something else." end Chat:Chat(player.Character.Head, response, Enum.ChatColor.Blue) end local function onPlayerAdded(player) player.Chatted:Connect(function(message) onPlayerChatted(player, message) end) end Players.PlayerAdded:Connect(onPlayerAdded)