So I tried to make a Simple give script so when you say give/NC nc is a gear in lighting and I cant get it to do that... Can you guys help?
game.Players.PlayerAdded:connect(function(plyr)
if plyr == "narfh" then
plyr.Chatted:connect(function(chatmessage)
local command = {"give/NC"}
_, _, filter, receiver, gift = string.find(chatmessage, "(give/)(%w*/)(%w*)")
table.insert(command, filter); table.insert(command, receiver); table.insert(command, gift)
if #command == 3 and command[1] == "give/" then
local player = command[2]:sub(1, (command[2]:len() - 1))
local tool = command[3]
if game.Players:FindFirstChild(player) and game.Lighting:FindFirstChild(tool) then
game.Lighting[tool]:Clone().Parent = game.Players[player].Backpack
end
end
end)
end
end)

1 comment
In codeBlock please