Hello I am new to Lua and I know very little now with this script, what I am trying to do is make a script that randomizes each players weapon, for example lets say theres 4 players in my game, then each one of them will recieve a different weapon that was stored in lighting, heres the script, also when I try playing solo my character won´t appear in that place.
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) repeat wait() until p:FindFirstChild("Backpack") game.Lighting:GetChildren()[math.random(1, #game.Lighting:GetChildren())]:clone().Parent = p.Backpack end) wait(2) end)

1 comment
Sorry I can´t test it because of my freaking glitched studio it says "Waiting for character" when I try playing in my place