How to make chat activated door!

Опубликовано: 06 Август 2026
на канале: LornCore
138
5

Hey guys This is bad dev Thank you for watching and make sure to hit the subscribe button and the like button.
Twtich Channel:   / lorncore  
Script:
local message = "subscribe" -- replace subscribe with your trigger message
local door = script.Parent
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if (msg == message) then
door.CanCollide = false
for i = 1, 9 do
door.Transparency = door.Transparency + 0.1
wait()
end
wait(5)
for i = 1, 9 do
door.Transparency = door.Transparency - 0.1
wait()
end
door.CanCollide = true
end
end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)