I got this script
door = script.Parent
function onChatted(msg, recipient, speaker)
source = string.lower(speaker.Name)
msg = string.lower(msg)
-- thecharacter = script.Parent.TheCharacter
if (msg == string.match(File.name)) then
door.CanCollide = false
door.Transparency = 0.7
wait(4)
door.CanCollide = true
door.Transparency = 0
end
end
game.Players.ChildAdded:connect(function(plr)
plr.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, plr) end)
end)
Is it possible to match the user msg with an image name instead of a character?
I m new to lua and can t seem to find anything about this.
New contributor
RaZzA is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.