#modifying script

28 messages · Page 1 of 1 (latest)

keen hill
#

@night island 1 command is the classname not the name of the textcommand. 2 why event specify class on a method that can only call a single class?

night island
# keen hill <@733905085066903602> 1 command is the classname not the name of the textcommand...

i dont understand what u just said but i want the command to be triggered to this can run

--!strict
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")

local Command: TextChatCommand = TextChatService:WaitForChild("TextChatCommand")
local SystemChannel: TextChannel = TextChatService:FindFirstChild("RBXSystem", true)

Command.Triggered:Connect(function(textSource, message)
    SystemChannel:DisplaySystemMessage("Supersizing")
end)
keen hill
#

Well then start learning scripting terms

night island
#

😕 okay..

keen hill
#

Do you even know what the first script you’ve send tries to do?

night island
#

im not sure about local player = Players:GetPlayerByUserId(textSource.UserId) tho

keen hill
#

Really?

#

You don’t know what that does

night island
keen hill
#

Read the method out slowly

night island
#

it gets the players user id?

keen hill
#

Correct

night island
#

what does (textSource.UserId) mean

keen hill
#

TextSource is send with the event. Which basically shows script which id sent the message and if or if not a player dan send a message inside that server

#

But this can all be googled

night island
#

oh wait i get it now

#

i dont really need local player = Players:GetPlayerByUserId(textSource.UserId) right

keen hill
#

I still don’t know what you’re trying to do

#

But it looks like a code from a tutorial

night island
#

im trying to trigger Command when someone joins the server

#

like a specific name

keen hill
#

Welp

#

Start reading then

night island
#
--!strict
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")

local Command: TextChatCommand = TextChatService:WaitForChild("TextChatCommand")
local admin = 'Tilted_Jeff'

Players.PlayerAdded:Connect(function(player)
    if player.Name == admin then
        print('test')
        Command.Triggered:Connect(function()
        end)
    end
end)
tidal heronBOT
#

studio** You are now Level 3! **studio

night island
#

i think im doing something wrong