I'm developing my new game ROBLOX Ware, and there's something that I need for my MicroGame to work.
The Problem is, I don't know how to get 'Chatted' to work with a local script.
This is what I have so far:
wait()
local mf = game.Workspace.MasterFunctions
local player = game.Players.LocalPlayer
function processCommand(speaker, message)
if message == "8" then
if mf.GameInitials.Value == "SSP1" then
script.Parent.Parent.GameStats.ProblemSolvedOne.Value = true
end
elseif message == "9" then
if mf.GameInitials.Value == "SSP2" then
--nothing yet
end
elseif message == "4" then
if mf.GameInitials.Value == "SSP3" then
--nothing yet
end
end
end
player.CharacterAdded:connect(function()
player.Chatted:connect(function(message)
processCommand(player, message)
end)
end)

4 comments
Bump
Tested this myself, and Chatted is most definitely being fired properly. Maybe there's something wrong with your ifs?
I think you might have to use the Chat service with game:GetService() with a chat service variable. Although, I am not certain but you should try regardless.
Alright.