-
What do you want to achieve?
I’m trying to make a thing where when a player joins the game, it automatically equips a tool called “Tool” in workspace. -
What is the issue?
It works fine for the first person who joins the game. After that though, nobody else gets the tool. -
What solutions have you tried so far?
I tried This article on the developer hub, but the script they gave had the exact same problem.
There are no errors in the output either
Code:
game.Players.PlayerAdded:Connect(function(plr)
local player = plr.Name --get players name
local playerInWorkspace = game.Workspace:WaitForChild(player) --wait for player to appear in workspace (game.Workspace[player]...)
local hum = game.Workspace[player]:WaitForChild("Humanoid") --wait for humanoid in the player
local tool = workspace:FindFirstChild("Tool") --wait for a tool named "Tool" to load in workspace
hum:EquipTool(tool) --equip it
end)