I've been trying to make a spawn that detects if a player is on your friends list, and then spawns them there if they are. I don't want to utilize teams for this, and have been having trouble without the use of teams. I was wondering if anyone could help me out with this. Thanks
local friendId = 0 --replace local friendSpawnPos = workspace.friendSpawn.Position --replace local isFriendsCache = setmetatable({}, {__index = function(self, i) self[i] = game:GetService("Players")[i]:IsFriendsWith(friendId) return self[i] end}) game:GetService("Players").PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) if isFriendsCache[plr.Name] then char:WaitForChild"HumanoidRootPart".CFrame = CFrame.new(friendSpawnPos) end end) end)