So, I'm try to make something.. Yes something, and for it I need to get the value of what the player says, I tryed stuff from the wiki and made this and it... Doesn't work. :/
function playerjoins(Player) Player.Chatted:connect(message) end function message(msg) local text = Instance.new ("StringValue") text.Parent = script text.Value = msg script.Parent.Text = text.Value end game.Players.PlayerAdded:connect(playerjoins)
Too many functions... and remember to pass the msg to the message function as a parameter. If you wish to keep your format of script then on line 2 change it to -- Player.Chatted:connect(message(msg)) <- lmk if this doesn't work, I may have it wrong, but I would say the below method is much easier than a bunch of functions spread out
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) -- here you do stuff with the message, you can do things like -- if msg == "hello" then -- to get a lowercase version of the msg simply create a new variable --lower = string.lower(msg) --This is where you would to the string value thing your trying to work out end) end)