I need some help with this script
for i = 1, #game.ReplicatedStorage:GetChildren() do if game.ReplicatedStorage[i].Name:sub(1,6) == "Katana" and isAdmin then local k = game.ReplicatedStorage[game.ReplicatedStorage[i].Name]:clone() -- here is the error k.Parent = plr.Backpack end end --Output >00:44:41.957 - 1 is not a valid member of ReplicatedStorage
i tried these above...
for i = 1, #game.ReplicatedStorage:GetChildren() do if game.ReplicatedStorage[i].Name:sub(1,6) == "Katana" and isAdmin then local k = game.ReplicatedStorage[i].Name:clone() k.Parent = plr.Backpack end end --Output >00:47:09.667 - 1 is not a valid member of ReplicatedStorage
Then I use this script
for i = 1, #workspace:GetChildren() do print(workspace[i].Name) end --Output >00:51:07.855 - 1 is not a valid member of Workspace
Please help,i am out of ideas. Thanks in advance!!! Got the answer from the Scripter Helper Chat room