Right now I’ve just setup a really simple script which honestly I didn’t think I’d have a problem with.
There’s a value in each tycoon called “Owner” when a player joins the script scans through the tycoons and finds an owner value that is empty and assigns it to the player. I ran this on a test server with 2 players, the second player wasn’t given a tycoon. Any ideas why?
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
-- Find Unowned Tycoon
local Tycoons = game.Workspace:FindFirstChild("Tycoons")
for i, Tycoon in ipairs(Tycoons:GetChildren()) do
if Tycoon:FindFirstChild("Owner").Value == "" then
Tycoon:FindFirstChild("Owner").Value = player.Name
Tycoon:FindFirstChild("Door").Arch.Display.plrName.Text = player.Name.."'s Tycoon"
print(player.Name.." now owns "..Tycoon.Name)
end
end
end)