Not sure if I'm doing this the right way. I'm getting stuck at if v2.Name == v.Value
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if player:WaitForChild("swordBackpack")then
if player.swordBackpack then
local swordList = player.swordBackpack:GetChildren()
for i,v in pairs(swordList) do
if v:IsA("StringValue") then
if game.ReplicatedStorage.SWORDBANK then
local swordbank = game.ReplicatedStorage.SWORDBANK:GetChildren()
for i,v2 in pairs(swordbank) do
if v2:IsA("Tool") then
if v2.Name == v.Value then
print(v)
end
end
end
end
end
end
end
end
end)
end)

1 comment
I needed to look for the name of the stringValue instead of its value, so my scripts actually worked lol... thanks though this looks a lot neater