Hi, I’m trying to make a training command. For example, you execute the “:start” command and the game goes over with information. I’ve tried this but I got an error. Does anyone know what’s the error?
1 Like
Hovering over the end
thing should provide additional information. Can you please hover over it and tell us what it says?
Edit: May also need to remove the end on line 28
1 Like
I’m no expert in basic admin but i think you should remove the last end here:
This script should help you out, make sure to mark it as a solution if it works for you!
local Plugin = function(...)
local Data = {...}
local remoteEvent = Data[1][1]
local remoteFunction = Data[1][2]
local returnPermissions = Data[1][3]
local Commands = Data[1][4]
local Prefix = Data[1][5]
local actionPrefix = Data[1][6]
local returnPlayers = Data[1][7]
local cleanData = Data[1][8]
local remoteEvent = Data[1][1]
local pluginName = 'training'
local pluginPrefix = Prefix
local pluginLevel = 2
local pluginUsage = "<User>" -- leave blank if the command has no arguments
local pluginDescription = "Posts the information about the training thing."
local InformationMessages = {"Message1", "Message2"} -- Displayed Messages
local DisplayTime = 5 --display time
local pluginFunction = function(Args)
local Player = Args[1]
for _, Message in pairs(InformationMessages) do
remoteEvent:FireAllClients('Message', 'Training Message', Message)
wait(DisplayTime)
end
end
local descToReturn
if pluginUsage ~= "" then
descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
else
descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
end
return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end
return Plugin
1 Like
Delete the last end:
return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end-- Here