I want to make a script where whenever the person says a number something happens but when I started a problem started occurring please help It prints nill when i say it. I think it is something to do with my answer my script is :
game.Players.PlayerAdded:Connect(function(player)
math.randomseed(tick())
for _ = 1, 1 do
local answer = (math.random(100))
end
player.Chatted:Connect(function(message)
if message == "red" then
print(awnswer)
end
end)
end)

2 comments
Thank you so so so so so so much!
if you haven't noticed yet, you misspelled "answer" on line 8.