Hey guys, currently I am having scripting problems. Here is what I want the script to do:
When someone spawns, check and see if their name is "Parkatr0n". If true, give them a certain weapon. If not, do nothing.
Here is my script(it probably has several errors):
local mp40 = game.ServerStorage.MP40
game.Players.PlayerAdded:connect(function(player)
local allow = {
player.Name == "Parkatr0n"
}
if allow then
local mp40Copy = mp40:Clone()
mp40Copy.Parent = player.Backpack
mp40Copy.Parent = player.StarterPack
end
end)
Just to be clear:
Problem: It does not give me the weapon
Location: This script is in Workspace. |