This script is uses for Startergear. For example I say "Sword" then it puts it in the starter gear so when you die you will still have.
names = {"GTDRIVER"} -- Add in the names of the people you want to be able to use the command script here.} game.Players.PlayerAdded:connect(function(player) for i, v in pairs(names) do if v == player.Name then player.Chatted:connect(function(chatmsg) if (msg == "Sword") then game.Lighting["Sword"]:Clone().Parent = Player.StarterGear end end) end end end)
You used "chatmsg" for one variable, and "msg" for the other. You also used inconsistent capitalization for the player variable. Make sure they're the same.
names = {"GTDRIVER"} -- Add in the names of the people you want to be able to use the command script here.} game.Players.PlayerAdded:connect(function(player) for i, v in pairs(names) do if v == player.Name then player.Chatted:connect(function(msg) if (msg == "Sword") then game.Lighting["Sword"]:Clone().Parent = player.StarterGear end end) end end end)