So I am making a simulator, and I put my userid in a table and when the player joined, it checks if the player’s user id matches with the ones in the table using a table.find, but it is not putting the tool in admin backpack. How can I fix this?
Code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local adminTable = {1597882185}
Players.PlayerAdded:Connect(function(player)
if table.find(adminTable, player.UserId) then
print("Admin joined")
local tool = ReplicatedStorage:WaitForChild("DevTool"):Clone()
tool.Parent = player.Backpack
end
end)
All the prints are working and no errors in the output, please help