'Backpack is not a valid member of Player' help me please?
Hello !, I have a problem in a script, what I want is that when the player joins the Team a weapon appears automatically, but I get an error saying the following: 'Backpack is not a valid member of Player'.
This is the 'Script':
02 | local Teams = game:GetService( "Teams" ) |
04 | local team = Instance.new( "Team" , Teams) |
05 | team.AutoAssignable = true |
07 | print (team.Parent, team.TeamColor) |
09 | local tool = game.ReplicatedStorage.Pistola |
10 | tool:Clone().Parent = team |
12 | local function armas(plr) |
13 | for i,v in pairs (team:GetChildren()) do |
15 | local Tools = v:Clone() |
16 | Tools.Parent = plr.Backpack |
21 | local function onPlayerJoinedTeam(player) |
22 | print (player.Name, "joined the team" ) |
23 | armas(game.Players.LocalPlayer) |
26 | team.PlayerAdded:Connect(onPlayerJoinedTeam) |
By the way I'm using a normal Script located in 'Workspace'.
I hope you help me ... Thank you!.