So I'm trying to assign an airport to the player when the enter the game but it isn't working correctly and there is no output, yes there is a connection line, I just didn't feel like posting the rest of the script:
function PlayerEntered(player) print(player.Name .. " entered the server") --Stats airport = Instance.new("IntValue", player) airport.Name = "Airport" airport.Value = "None" -- wait() --Assigning Airport -------------------------------This part doesn't execute for some reason? for _,v in pairs(game.Workspace.Airports:getChildren()) do if airport.Value == "None" then if v.Owner.Value == "None" then airport.Value = tonumber(string.sub(v.Name,7,8)) v.Owner.Value = player.Name end end end ------------------------------- end
airport.Value = "None"
You're attempting to assign a String to an IntValue.