I'm making a "name that character" script; when you say the right word you'll pass through. But, when I play the game i can just go through all of them help me!!!
local door = script.Parent game.Players.PlayerAdded():connect(function(player) player.Chatted:connect(function(msg) if msg == "msg" then door.CanCollide = false door.Transpareny = 1 wait(3) door.CanCollide = true door.Transparency = 0 end end end
local door = script.Parent -- you don't need the () after PlayerAdded game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg:lower() == "msg" then -- i used the lower method so it's not case-sensitive door.CanCollide = false door.Transpareny = 1 wait(3) door.CanCollide = true door.Transparency = 0 end end) -- you need closing parentheses on these two ends because your connecting the function to the event anonymously end)
Change the if msg =="to the characters name in the picture"