Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

I need a script that if a player says a number, it prints that number.

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

Nidal123

New Member
Reputation: 0 / 0 / 0
Aug 17, 2021
5
0
1
Roblox
Scripter_NidalTR
I need a script that if a player says a number, it prints that number.

Please help me fast I need it real quick.
 

CallMeKY

Moderator
Ultra
Reputation: 6 / 0 / 0
Feb 25, 2018
1,701
84
848
113
Maine, USA
Roblox
CallMeKY
Discord
CallMeKY#5012
I need a script that if a player says a number, it prints that number.

Please help me fast I need it real quick.
If you just need it to be exactly that number and nothing else that's pretty simple, you don't even need string manipulation.

Lua:
local numberToFind = 123

game:GetService('Players').PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        if message ~= tostring(numberToFind) then return end
        -- do the things
    end)
end)