Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Opening door with a word?

Asked by 6 years ago

I want to make a game that is the same idea as "Guess That Character" or something like that but I can't figure out how to do it. Can someone help me, please?

0
http://wiki.roblox.com/index.php?title=API:Class/Player/Chatted, Use this to get what the player is chatting, accompany that with suitable events. If you still can't decide what to do , I recommend learning off youtube. arshad145 392 — 6y

1 answer

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago

Something like this should work if you put it in a part and name that part after the character the player has to guess.

game.Players.PlayerAdded:Connect(function(plr)
    plr.Chatted:Connect(function(msg)
        if msg == script.Parent.Name then
            script.Parent.CanCollide = false
            wait(1)
            script.Parent.CanCollide = true
        end
    end)
end)

You can also use collision filtering to make it so that only the player who said the name can pass through for the time its open.

Ad

Answer this question