No errors are show, I am completely stuck to what is wrong?
game.Players.PlayerAdded:Connect(function(plr) if game.Teams:FindFirstChild("Customer") and game.Teams:FindFirstChild("Manager") then local leaderstatsA = plr:WaitForChild("leaderstatsA") if leaderstatsA:WaitForChild("Customer").Value == true and leaderstatsA:WaitForChild("Manager").Value == false then print("idk") plr.Team = game.Teams.Customer end if leaderstatsA:WaitForChild("Manager").Value == true and leaderstatsA:WaitForChild("Customer").Value == false then plr.Team = game.Teams.Manager end end end)
@doggybite1 if it helps the only other script in the game is this one
local datastore = game:GetService("DataStoreService") local ds1 = datastore:GetDataStore("Customer") local ds2 = datastore:GetDataStore("Manager") game.Players.PlayerAdded:connect(function(plr) local folder = Instance.new("Folder", plr) folder.Name = "leaderstatsA" local Customer = Instance.new("BoolValue", folder) Customer.Name = "Customer" local Manager = Instance.new("BoolValue", folder) Manager.Name = "Manager" Customer.Value = ds1:GetAsync(plr.UserId) or true ds1:SetAsync(plr.UserId, Customer.Value) Manager.Value = ds2:GetAsync(plr.UserId) or false ds2:SetAsync(plr.UserId, Manager.Value) Customer.Changed:connect(function() ds1:SetAsync(plr.UserId, Customer.Value) end) Manager.Changed:connect(function() ds2:SetAsync(plr.UserId, Manager.Value) end) end)