I made a script that gives me or the solo test "Player" a tool when they join a game. However, it doesn't work, and the output doesn't tell me anything. Here is the script.
local Players = game:GetService("Players") function onPlayerAdded(player) local l = game.ServerStorage.LASM:Clone() if player.Name == "Wizardel" or player.Name == "Player" then l.Parent = player.Backpack end end Players.PlayerAdded:connect(onPlayerAdded) for _,player in pairs(Players:GetPlayers()) do onPlayerAdded(player) end
I need the
for _,player in pairs(Players:GetPlayers()) do onPlayerAdded(player) end
bit so that it works in Solo Test mode. Can anybody help?
Usually, the player is called "Player1" and "Player2" and so on... Try changing the string to that.