Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Gear Lighting Script?

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)

I can't seem to figure this out, I want it to give me a gear that's called NC but when I'm in game it wont work can you help me?

2 comments

3

I give up, I can't read it.

0

Guys you can't read the scripts becuase your not that avanced so don't dislike it becuase you can't read the script it says dislike it if you can't undertand the question...

1 answer

✓ Accepted answer
game.Players.PlayerAdded:connect(function(plyr) if plyr.Name == "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)

I must admit, it was hard to read, but I found the problem immediately. You tried to check if the player object was Narfh, but it's not. The Name of the player object is Narfh.

This discussion is preserved as it was. New answers, comments, and votes are closed.