i have some guns thats for my friends but i dont know how to make only them spawn with the guns, the only way i can do right now is using admin
COMMUNITY QUESTION
How do i make specific players spawn with specific weapons?
2 answers
This isn't a request site but whatever.
local Whitelist = {"",""} -- People that will spawn with weapons.
local Weapons = {game.ServerStorage["Glock 19"],game.ServerStorage["Glock 21"]} -- Put the location of the guns here.
game.Players.PlayerAdded:Connect(function(Player)
for i,v in pairs(Whitelist) do
if v == Player.Name then
for i,v in pairs(Weapons) do
local A = v:Clone()
A.Parent = Player.Backpack
end
else
end
end
local C = workspace:WaitForChild(Player.Name)
if C.ClassName == "Model" then return true end
C.Humanoid.Died:Connect(function()
Player:LoadCharacter()
wait(.5)
for i,v in pairs(Whitelist) do
if v == Player.Name then
for i,v in pairs(Weapons) do
local A = v:Clone()
A.Parent = Player.Backpack
end
else
end
end
end)
end)
so idk where to insert the script is it serverscript stuff or where
1 comment
0
why would you put your edit as an entire answer... this site needs a tutorial
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
so where do i insert the script?
I think you would insert the script in ServerScriptService
i tried but it doesnt work
Make sure you replace the values required or of course it won't work.
Make sure you replace the values required or of course it won't work.
can u like help me or something?
I dont think you need to add in the else on line 10