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

Why am I getting this member error with ChatService?

Asked by 6 years ago
local ChatService = game:GetService("Chat")
local Channel = ChatService:GetChannel("All")

The error "GetChannel is not a valid member of Chat" is returned when the script is ran, but I'm not sure why because GetChannel is a valid member of Chat.

1 answer

Log in to vote
1
Answered by 6 years ago

Because that isn't a member of the Chat service! The Chat service is made with C, just like every other objects. The objects created with "GetChannel" and other similar features are developer-made, using lua metatables. You cannot use those methods out of the context of the modules.

Ad

Answer this question