local player = game.Players.LocalPlayer if player.Name == "TudiPYM" then local register = game.ReplicatedStorage:FindFirstChild("Black Registry") local clone = register:Clone() clone.Parent = player.Backpack end
Doesn't seem to work. (I put the script in ServerScriptService)
Hi. First off, put it in a script. And try the following:
local OwnerId = {game.CreatorId} game.Players.PlayerAdded:Connect(function(checkPlr) if table.find(OwnerId, checkPlr.UserId) then local newRegister = game:GetService("ReplicatedStorage"):WaitForChild("Black Registry") local clone = newRegister:Clone() clone.Parent = checkPlr.Backpack wait(2) print(#OwnerId.." players will be given a tool if online.") else warn("Someone joined but is not a owner! :(") end end) If it's do not work, tell me in the comments.
local player = game.Players.LocalPlayer
that will only work in local scripts.
Try this.
game.Players.PlayerAdded:Connect(function(player) if player.Name == "TudiPYM" then local register = game.ReplicatedStorage:FindFirstChild("Black Registry") local clone = register:Clone() clone.Parent = player.Backpack end end)