RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a chatbot using your ai to awnser chat messages."
-- ScripterAI can't create a full chatbot within Roblox, but here's a simple script to respond to specific chat messages local Players = game:GetService("Players") local function onPlayerChatted(player, message) message = message:lower() local response = "" if message == "hello" then response = "Hello, " .. player.Name .. "!" elseif message == "how are you?" then response = "I'm an AI, so I don't have feelings, but I'm here to help!" elseif message == "what can you do?" then response = "I can help with simple scripting tasks in Roblox and Lua!" else response = "I'm not sure how to respond to that. Please try asking something else." end if response ~= "" then game:GetService("Chat"):Chat(player.Character.Head, response, Enum.ChatColor.Blue) end end local function onPlayerAdded(player) player.Chatted:Connect(function(message) onPlayerChatted(player, message) end) end Players.PlayerAdded:Connect(onPlayerAdded) for _, player in ipairs(Players:GetPlayers()) do onPlayerAdded(player) end