I'm thinking of making a "Name That Character"game ,in the "Name That Character" game, I want to make a script where you have to say the name of the decal? And also after you the name of the decal, isn't it CanCollide, and Transparency?
door = script.Parent --this is the door
function onChatted(msg, recipient, speaker)
-- convert to all lower case
local source = string.lower(speaker.Name) msg = string.lower(msg)
if (msg == "name") then door.CanCollide = false door.Transparency = 0.7 wait(3) door.CanCollide = true door.Transparency = 0 end
end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered)
You would use OnChatted events to pick up when the player chats the name of the character.
This script should go inside of your door with the image.
local door = script.Parent game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "open" then --'open' is the name of the character or person you want them to say. (It is case sensitive) door.CanCollide = false door.Transparency = 1 wait(3) door.CanCollide = true door.Transparency = 0 end end) end)