I'm attempting to make a tool giver script, with the name of user's and their tools. If anyone could point me in the right direction, or even solve it yourself, that would be great!
--// added dictionary for addition of more people
local Dictionary = {
["IomharOBriain"] = "Poseidon's Touch",
["BonesMcClyde"] = "Champion's Trident",
["JamesMcClyde"] = "XelGuard"
}
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
for i, v in pairs(Dictionary) do
if player.Name == Dictionary[i[1]] then
print("success", i, player.Name)
else
print("fail", i, player.Name)
end
end
end)
end)

4 comments
You want to get the first argument in the table only? Or find the name in the whole table?
i dont see why you would need to do Dictionary[i[1]]. you can just do i instead. try it
Correct, NotTheChara, I want to get the first argument only. And Zeuxulaz, I already tried it with i, and no change.
I think you should check each arguments to give the tool to the player? Although you can get the first argument only, it can only give the tool to IomharObriain.