Is there any way I can find the target? There isn’t really anything in the documentation and I was wondering if there was any way
local TextChatService = game:GetService("TextChatService")
local Prefix = "/"
function Command(Name, PrimaryAlias, SecondaryAlias)
local Command = Instance.new("TextChatCommand")
Command.Name = Name
Command.PrimaryAlias = Prefix .. PrimaryAlias
Command.SecondaryAlias = Prefix .. SecondaryAlias
Command.Parent = TextChatService -- Explicitly setting the parent
return Command
end
local Kill = Command("KillCommand", "kill", "k")
Kill.Triggered:Connect(function(Player, Arguments)
-- Code here
end)