So this is my 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.lower(thecharacter.Value)) then
door.CanCollide = false
door.Transparency = 0.7
local sound = Instance.new(“Sound”)
sound.SoundId = “rbxassetid://1839997962”
sound.Looped = false
sound.Parent = workspace
sound:Play()
wait(3)
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)
I’ve checked some posts but I don’t understand the thing with RemoteEvent I’ve also checked the official Roblox guide too RemoteEvent | Documentation - Roblox Creator Hub
I have checked but still don’t understand. Im a noobie as you probably see so any help is appreciated